Cod sursa(job #2185683)
Utilizator | Data | 24 martie 2018 19:13:20 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.35 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream fin("text.in");
ofstream fout("text.out");
char c;
int nr,t;
bool ok;
int main()
{ while(fin.get(c))
{ if((c>='a'&&c<='z')||(c>='A'&&c<='Z'))
{ if(ok==false){ok=true;nr++;}
t++;
}
else ok=false;
}
fout<<t/nr;
return 0;
}