Pagini recente » Cod sursa (job #2893860) | Cod sursa (job #2389686) | Cod sursa (job #88050) | Cod sursa (job #3196671) | Cod sursa (job #1059621)
#include <stdio.h>
#include <string.h>
#include <ctype.h>
char text[8388608];
int nr_cuvinte;
int lungime;
int main()
{
freopen("text.in", "r", stdin);
freopen("text.out", "w", stdout);
gets(text);
int i = 0;
while (text[i])
{
while (text[i] && !isalpha(text[i]))
{
++i;
}
while (text[i] && isalpha(text[i]))
{
++i;
++lungime;
}
++nr_cuvinte;
}
printf("%d", lungime / nr_cuvinte);
return 0;
}