Cod sursa(job #1422845)
Utilizator | Data | 19 aprilie 2015 22:40:12 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.4 kb |
#include <cctype>
#include <cstdio>
using namespace std;
int n,l,x=0;
char c;
int main(void){
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
while(scanf("%c",&c)!=EOF){
if(isalpha(c)){
if(x==0)
++n;
++x;
++l;
}
else
x=0;
}
printf("%d",l/n);
return 0;
}