Cod sursa(job #211430)
Utilizator | Data | 2 octombrie 2008 10:00:39 | |
---|---|---|---|
Problema | Text | Scor | 70 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.34 kb |
#include<stdio.h>
char c;
int nrcuv=0,nrlit=0,ok;
int main()
{freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
while(!feof(stdin))
{ok=0;
while(c>='a' && c<='z' || c>='A' && c<='Z')
{nrlit++;scanf("%c",&c);ok=1;}
if(ok)
nrcuv++;
scanf("%c",&c);
}
printf("%d ",nrlit/nrcuv);
return 0;
}