Cod sursa(job #329409)
| Utilizator | Data | 6 iulie 2009 09:48:08 | |
|---|---|---|---|
| Problema | Text | Scor | 90 |
| Compilator | cpp | Status | done |
| Runda | splunge1 | Marime | 0.47 kb |
#include<stdio.h>
#include<string.h>
char s;
int n,nr_lit,nr_cuv;
int main ()
{
freopen("text.in","r",stdin),freopen("text.out","w",stdout);
int i,aux=0;
while (scanf("%c",&s)!= EOF)
{
if((97<=s && s<=122) || (65<=s && s<=90))
{
++nr_lit;
aux=1;
}
else
{
nr_cuv+=aux;
aux=0;
}
}
printf("%d",nr_lit/nr_cuv);
return 0;
}
//97 122 65 90
