Pagini recente » Cod sursa (job #2211753) | Cod sursa (job #2510699) | Cod sursa (job #1074269) | Cod sursa (job #2084173) | Cod sursa (job #329408)
Cod sursa(job #329408)
#include <stdio.h>
char c;
int nr,cont;
int main()
{
int fol=1;
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
c=fgetc(stdin);
while(! (c>='A' && c<='Z') || (c>='a' && c<='z') )
c=fgetc(stdin);
while(!feof(stdin))
{
if( (c>='A' && c<='Z') || (c>='a' && c<='z') )
{
++nr;
fol=0;
}
else
if(fol==0)
{
++cont;
fol=1;
}
c=fgetc(stdin);
}
if(fol==0)
++cont;
printf("%d",nr/cont);
return 0;
}