Cod sursa(job #569481)
Utilizator | Data | 1 aprilie 2011 15:53:02 | |
---|---|---|---|
Problema | Text | Scor | 20 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.28 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==' ')
numc++;
}
printf("%d",numl/numc-1);
return 0;
}