Cod sursa(job #823346)

Utilizator antonioteoZait Teodor Antonio antonioteo Data 24 noiembrie 2012 21:49:23
Problema Text Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.53 kb
#include <fstream>
#include <cstring>
using namespace std;
const char iname[] = "text.in";
const char oname[] = "text.out";
ifstream fin(iname);
ofstream fout(oname);
char s[ 481624 ];
int lg , i , j , lgt , nr_cuv , vs , verita;
char a , b;
int x , y;
void VeritaSerum ()
{
	while ( fin.get( a ) )
	{
		if( a >= 'a' && a <= 'z' || a >= 'A' && a <= 'Z' )
			++x;
		else
			if( b >= 'a' && b <= 'z' || b >= 'A' && b <= 'Z' )
				++y;
		b = a;
	}
}
int main()
{
	VeritaSerum ();
	fout << x / y << '\n';
	return 0;
}