Cod sursa(job #450934)

Utilizator mlupseLupse-Turpan Mircea mlupse Data 8 mai 2010 17:57:03
Problema Text Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.39 kb
using namespace std;
#include <iostream>
#include <fstream>
#include <string.h>
#include <ctype.h>
ifstream fin("text.in");
ofstream fout("text.out");
int main()
{
char x[1048589];
int n=0,nr=0,i;

while(fin.getline(x,1048589))
for(i=0;x[i];)
  {
  if (isalpha(x[i]))
    {
	 
		while (isalpha(x[i]))
	     {i++;n++;}
	  nr++;
	}
   else i++;
  }
cout<<n/nr;
return 0;
}