Cod sursa(job #304231)

Utilizator mathboyDragos-Alin Rotaru mathboy Data 11 aprilie 2009 15:39:42
Problema Text Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.43 kb
#include<stdio.h>
#include<ctype.h>


int main()
{
    char x;
    int sw=0,s=0,c=0;
    freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
while(!feof(stdin))
{
   sw=1;
   while (!isalpha(x)&&! feof(stdin))
   	x=fgetc(stdin);
   while (isalpha(x)&&! feof(stdin))
   	{
      sw=0;
    	s++;
      x=fgetc(stdin);
      }
   if (sw==0)
   	c++;
   }
printf("%d", s/c);  
return 0;  
return 0;
}