Cod sursa(job #252949)

Utilizator funkydvdIancu David Traian funkydvd Data 5 februarie 2009 10:45:14
Problema Text Scor 90
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.32 kb
#include<fstream>
using namespace std;
ifstream f1("text.in");
ofstream f2("text.out");
int main()
{
	char c;
	int cuv=0,lit=0;
	int v=0;
	while (f1.get(c))
		if ((c>=65 && c<=90) || (c>=97 && c<=122)) v++;
	        else if(v>0) {lit+=v; v=0; cuv++;}
	f2<<lit/cuv;		
	f1.close();
	f2.close();
	return 0;
}