Cod sursa(job #715018)
Utilizator | Data | 16 martie 2012 14:54:43 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.31 kb |
#include <cstdio>
#include <cctype>
int main () {
int cl=0,ccv=0,lc=0;
char el;
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
for(;scanf("%c",&el)!=-1;){
if(isalpha(el)){
++cl;
++lc;
}
else {
if(lc>0)++ccv;
lc=0;
}
}
printf("%d",cl/ccv);
return 0;
}