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