Cod sursa(job #786015)
Utilizator | Data | 10 septembrie 2012 13:01:55 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.3 kb |
#include<cstdio>
#include<ctype.h>
char c;
int n,m;
int main()
{
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
while(scanf("%c",&c)!=EOF)
{
if(isalpha(c))
{
n++;
while(isalpha(c))
{
m++;
scanf("%c",&c);
}
}
}
printf("%d",m/n) ;
return 0;
}