Cod sursa(job #521342)

Utilizator godlikezorRoibu Adrian godlikezor Data 12 ianuarie 2011 08:39:23
Problema Text Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.34 kb
#include<fstream>
using namespace std;
ifstream f("text.in");
ofstream g("text.out");
int v[10];
int main()
{
	char c;
	int a=0,b=0,cuv=0;
	while ((c=f.get()) && (c!=EOF))
{
		if (('A'<=c&&c<='Z') || ('a'<=c&&c<='z'))
	{
			++a;
			++b;
}
		else 
			if (a!=0)
			{
				a=0;
				++cuv;
	}
}
		if (a!=0)
		{
			++cuv;
}
	
	g<<b/cuv;
	return 0;
}