Cod sursa(job #252943)

Utilizator funkydvdIancu David Traian funkydvd Data 5 februarie 2009 10:30:12
Problema Text Scor 0
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>>c) 
	        {f2<<c;
				if (c>=65 && c<=122 &&) v++;
	        else if(v>0) {lit+=v; v=0; cuv++;}}
	f2<<lit/cuv;		
	f1.close();
	f2.close();
	return 0;
}