Cod sursa(job #326103)
Utilizator | Data | 23 iunie 2009 19:42:30 | |
---|---|---|---|
Problema | Text | Scor | 70 |
Compilator | c | Status | done |
Runda | Arhiva de probleme | Marime | 0.46 kb |
#include <stdio.h>
int cuv,lg,i,beg,end;
char c;
int main()
{
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
while(scanf("%c",&c)!=EOF)
{
if((c>='a' && c<='z') || (c>='A' && c<='Z'))
{
while((c>='a' && c<='z') || (c>='A' && c<='Z'))
{
scanf("%c",&c);
lg++;
}
cuv++;
}
}
printf("%d",lg/cuv);
return 0;
}