Cod sursa(job #1046070)

Utilizator apopeid15Apopei Daniel apopeid15 Data 2 decembrie 2013 17:22:35
Problema Text Scor 40
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.32 kb
#include<fstream>
using namespace std;
ifstream f("text.in");
ofstream g("text.out");
int nrcuv,l,n,i;
char x;
int main(){
	l=0;
	nrcuv=0;
	while(f.get(x))
	{if(((x>=65)&&(x<=90))||((x>=97)&&(x<=122)))
		l++;
	else
	{if(x==' '||x=='-')
		nrcuv++;
	}
	}
	g<<l/nrcuv;
	f.close();
	g.close();
	return 0;
}