Cod sursa(job #326288)
Utilizator | Data | 24 iunie 2009 14:39:44 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | c | Status | done |
Runda | Arhiva de probleme | Marime | 0.4 kb |
#include <stdio.h>
#include <string.h>
int n,i,lg,cuv,ok;
char c;
int main()
{
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
while(scanf("%c",&c)!=EOF)
{
if((c>='a' && c<='z') || (c>='A' && c<='Z'))
{
lg++;
if(ok==0) cuv++;
ok=1;
}
else ok=0;
}
printf("%d",lg/cuv);
return 0;
}