Cod sursa(job #799811)

Utilizator Jim215Pop Flaviu Jim215 Data 20 octombrie 2012 09:49:22
Problema Text Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.39 kb
#include<iostream>
#include<fstream>
#include<string>
using namespace std;


int main()
{
	
	ifstream  f("text.in");
	ofstream  g("text.out");
	string a;
	char c;
	int ok=0,k=0,k1=0;
	while(!f.eof())
	{
		c=f.get();
		if( (c>=65 && c<=90) || ( c>=97 && c<=122)  )
		{
			ok=1;k1++;
		}
		else
		{
			if(ok==1)
				{ok=0;k++;}
		}
		
		
	
	}
	g<<k1/k;
	return 0;
	
}