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