Cod sursa(job #696873)
Utilizator | Data | 28 februarie 2012 20:39:37 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.3 kb |
#include<cstdio>
int n,i,j,k,rez,x;
char c;
int main()
{
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
k=1;
while(scanf("%c",&c)!=EOF)
{
if (((c>='a')&&(c<='z'))||((c>='A')&&(c<='Z')))
{
k=0;x++;
}
else if (k==0) rez++,k=1;
}
printf("%d",x/rez);
return 0;
}