Cod sursa(job #210653)
Utilizator | Data | 28 septembrie 2008 14:40:40 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.49 kb |
#include <stdio.h>
int main()
{
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
char c;
int i=0,nrl=0;
c = fgetc(stdin);
int ok;
while(!feof(stdin))
{ok=0;
while(c>='a'&&c<='z' || c>='A'&&c<='Z')
{
nrl++;
c = fgetc(stdin);
ok=1;
}
if(ok==1)
i++;
c = fgetc(stdin);
}
printf("%ld",(nrl)/i);
return 0;
}