Pagini recente » Cod sursa (job #406805) | Cod sursa (job #3199834) | Cod sursa (job #700741) | Cod sursa (job #3181508) | Cod sursa (job #329429)
Cod sursa(job #329429)
#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(!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;
}