Cod sursa(job #1446792)

Utilizator stefzahZaharia Stefan Tudor stefzah Data 2 iunie 2015 21:36:19
Problema Text Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.4 kb
#include <fstream>
using namespace std;
char x;
int y,ct,nr,k=0;
int main()
{freopen("text.in","r",stdin);
 freopen("text.out","w",stdout);
 while(!feof(stdin))
     {scanf("%c",&x);
      if(!feof(stdin))
        {y=x;
         if((y>=65&&y<=90)||(y>=97&&y<=122)){nr++;if(k==0){ct++;k=1;}
                                            }
         else k=0;
        }
     }
 printf("%d",nr/ct);
}