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