Pagini recente » Cod sursa (job #2881608) | Cod sursa (job #2633233) | Cod sursa (job #3287696) | Cod sursa (job #2585533) | Cod sursa (job #34493)
Cod sursa(job #34493)
#include <stdio.h>
#include <string.h>
#include <ctype.h>
int main()
{
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
int nrw = 0, nrc = 0, ok = 0;
char c;
while(!feof(stdin))
{
scanf("%c", &c);
if(isalpha(c))
{
++nrc;
ok = 1;
}
else
{
if(ok)
{
++nrw;
ok = 0;
}
}
}
if(ok)
++nrw;
// printf("%d %d\n", nrc, nrw);
printf("%d\n", nrc / nrw);
return 0;
}