Cod sursa(job #2342672)
Utilizator | Data | 13 februarie 2019 00:29:23 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.5 kb |
#include <iostream>
#include <cstring>
#include <fstream>
using namespace std;
ifstream f("text.in");
ofstream g("text.out");
char x;
int l,cuv,ok;
int main()
{
ok=1;
while(f.get(x))
{
if((x>='a' && x<='z') or (x>='A' && x<='Z'))
{
if(ok!=0)
cuv++;
l++;
ok=0;
}
else
ok=1;
}
g<<int(l/cuv);
return 0;
}