Cod sursa(job #647584)
Utilizator | Data | 11 decembrie 2011 17:08:41 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.29 kb |
#include<cstdio>
int l,c,k;
char s;
int main()
{freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
while(scanf("%c",&s)!=EOF)
if((s>='a'&&s<='z')||(s>='A'&&s<='Z'))
{l++;
if(!k)
c++;
k=1;}
else
k=0;
printf("%d",l/c);
return 0;}