Cod sursa(job #563941)
Utilizator | Data | 26 martie 2011 13:48:01 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.34 kb |
#include<stdio.h>
long l=0,c=0,k=0;
char ch;
int main()
{freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
while(scanf("%c",&ch)!=EOF)
if((ch>='a'&&ch<='z')||(ch>='A'&&ch<='Z'))
{l++;
if(k==0)
c++;
k=1;}
else
k=0;
printf("%ld\n",l/c);
fclose(stdin);
fclose(stdout);
return 0;}