Cod sursa(job #609619)

Utilizator coleguFatu Vlad Cristian colegu Data 22 august 2011 14:37:44
Problema Text Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.35 kb
#include<fstream>
#include<string>
using namespace std;
char c;
long l,k,lc,i;
int main()
{
	ifstream f("text.in");ofstream g("text.out");
	while(!f.eof())
	{
		f.get(c);
		if(isalpha(c))//verifica daca e litera
		{
		  while(!f.eof() && isalpha(c)) 
		   {
			l++;
             f.get(c);			
		   }
		  k++;
	   }
	}
	g<<l/k;
	f.close();g.close();
return 0;}