Cod sursa(job #838669)

Utilizator TudorMTudor Moldovanu TudorM Data 20 decembrie 2012 12:10:02
Problema Text Scor 20
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.28 kb
#include<fstream>

using namespace std;

ifstream f("text.in");
ofstream g("text.out");
char a;
int k, s;
int main()
{
	k=0;
	s=1;
	while(f.get(a))
	{
		if(('a'<=a&&a<='z')||('A'<=a&&a<='Z'))k++;
		else if(k)s++;
	}
	g<<k/s;
	f.close();
	g.close();
	return 0;
}