Cod sursa(job #502109)

Utilizator cristisp95Cristian cristisp95 Data 17 noiembrie 2010 19:21:06
Problema Text Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.38 kb
#include<iostream>
#include<fstream>
#include<string>
using namespace std;

ifstream in("text.in");
ofstream out("text.out");

int main()
{
	char a;
	int x = 0, y = 0, z = 0;

	while( fin.get(a) )
	{
		if( isalpha(a) )
		{
				y++;
		if( k == 0 )
				x++;
		z = 1;
		}
		else
		z = 0;
	}

	out << y/x << '\n';


	in.close();
	out.close();

	return 0;
}