Cod sursa(job #261371)
Utilizator | Data | 18 februarie 2009 09:47:13 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.34 kb |
#include <stdio.h>
#define NR 1050000
int main()
{
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
int litere=0,cuv=0,k=0;
char x,y;
while (scanf("%c",&x)!=EOF)
{
if ((x>='a' && x<= 'z') || (x>='A' && x<= 'Z'))
{
litere++;
if (k==0)
cuv+=1;
k=1;
}
else
k=0;
}
printf("%d",litere/cuv);
return 0;
}