Mai intai trebuie sa te autentifici.
Cod sursa(job #581773)
Utilizator | Data | 14 aprilie 2011 16:14:45 | |
---|---|---|---|
Problema | Text | Scor | 30 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.39 kb |
#include<stdio.h>
int u,lit,l,cuv;
int main()
{
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
scanf("%c",&u);
if(u>='A' && u<='Z' || u>='a' && u<='z')
lit++;
while(scanf("%c",&l)!=EOF)
{
if(l>='A' && l<='Z' || l>='a' && l<='z' && u>='A' && u<='Z' || u>='a' && u<='z')
lit++;
else
{
cuv++;
}
u=l;
}
printf("%d",lit/cuv);
return 0;
}