Pagini recente » Cod sursa (job #416770) | Cod sursa (job #2484506) | Cod sursa (job #1166597) | Cod sursa (job #2106634) | 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;
}