Cod sursa(job #595295)
Utilizator | Data | 11 iunie 2011 20:22:35 | |
---|---|---|---|
Problema | Text | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.42 kb |
#include <stdio.h>
int main()
{
int s=0,m=0,j=0;
char c=' ',c1=' ';
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
while (c!=EOF)
{
c1=c;
scanf("%c",&c);
if ((int)c>64 && (int)c<123) ++s;
else if ((int)c1>64 && (int)c1<123)
{
++m;
j+=s;
s=0;
}
}
printf("%d",j/m);
return 0;
}