Cod sursa(job #1061811)
| Utilizator | Data | 20 decembrie 2013 12:19:01 | |
|---|---|---|---|
| Problema | Text | Scor | 100 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.47 kb |
#include<cstdio>
int nr1,nr2,ok;
char c;
int main()
{
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
nr1=0;
nr2=0;
while(!feof(stdin))
{
if(feof(stdin)) break;
scanf("%c",&c);
ok=0;
while((c>='a'&&c<='z')||(c>='A'&&c<='Z'))
{
ok=1;
nr1++;
scanf("%c",&c);
}
if(ok==1) nr2++;
}
printf("%d",nr1/nr2);
return 0;
}
