Cod sursa(job #326284)
| Utilizator | Data | 24 iunie 2009 14:34:00 | |
|---|---|---|---|
| Problema | Text | Scor | 30 |
| Compilator | c | Status | done |
| Runda | Arhiva de probleme | Marime | 0.52 kb |
#include <stdio.h>
#include <string.h>
int n,i,lg,cuv,ok;
char c[10240];
int main()
{
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
gets(c);
n=strlen(c);
for(i=0; i<=n; i++)
if((c[i]>='a' && c[i]<='z') || (c[i]>='A' && c[i]<='Z'))
{
for(ok=1; ok;)
if((c[i]>='a' && c[i]<='z') || (c[i]>='A' && c[i]<='Z'))
{
lg++;
i++;
}
else ok=0,cuv++;
}
printf("%d",lg/cuv);
return 0;
}
