Cod sursa(job #569483)
Utilizator | Data | 1 aprilie 2011 15:57:09 | |
---|---|---|---|
Problema | Text | Scor | 40 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.29 kb |
#include<stdio.h>
int numc,numl;
char x;
int main()
{
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
while(scanf("%c",&x)!=EOF)
{
if(x>='A'&&x<='Z'||x>='a'&&x<='z')
numl++;
if(x==' '||x=='-')
numc++;
}
printf("%d",numl/numc);
return 0;
}