Pagini recente » Cod sursa (job #1805151) | Cod sursa (job #2146500) | Cod sursa (job #1753994) | Cod sursa (job #1085284) | Cod sursa (job #314908)
Cod sursa(job #314908)
#include <stdio.h>
char ch;
int k, len, cuv;
int main()
{
freopen("text.in" , "r" , stdin);
freopen("text.out" , "w" , stdout);
while(scanf("%c" , &ch) != EOF)
{
if((int(ch) >= 65 && int(ch) <=90) || (int(ch) >= 97 && int(ch) <= 122))
{
len++;
if(k == 0)
{
k = 1;
cuv++;
}
}
else
k = 0;
}
printf("%d" , len/cuv);
fclose(stdin);
fclose(stdout);
return 0;
}