Cod sursa(job #113104)

Utilizator alexeiIacob Radu alexei Data 8 decembrie 2007 19:44:19
Problema Text Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.33 kb
#include<stdio.h>

int main()
{ freopen("text.in","r",stdin);
  freopen("text.out","w",stdout);
    int len=0,cuv=0,k=0;
    
char ca;
while(scanf("%c", &ca)!=EOF)
{   if((ca>=65&&ca<=90)||(ca>=97&&ca<=122))
   {   ++len;
     if(k==0)
    { ++cuv;
     k=1;} 
   }
  else
  {k=0;}
  }
printf("%d\n",len/cuv);
return 0;
}