Cod sursa(job #654582)
Utilizator | Data | 30 decembrie 2011 17:42:53 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | winners2 | Marime | 0.32 kb |
#include <stdio.h>
int main()
{
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
char c ;
int cuv=0,lit=0;
while (scanf("%c",&c)!=EOF)
{
if (c>='a'&&c<='z'||c>='A'&&c<='Z')
{
cuv++;
while(c>='a'&&c<='z'||c>='A'&&c<='Z')
{
lit++;
scanf("%c",&c);
}
}
}
printf("%d",lit/cuv) ;
}