Cod sursa(job #806788)

Utilizator edytzu15Andrei Edouard edytzu15 Data 3 noiembrie 2012 15:28:08
Problema Text Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.35 kb
#include <fstream>
#include <string.h>
using namespace std;
char c;
int lung,i,cuv,nr;
int main()
{
	ifstream f("text.in");
	ofstream g("text.out");
	c=f.get();
	do{
		if(c>='a'&&c<='z'||c>='A'&&c<='Z'){
			lung++;
			cuv=1;
		}
		else
			if(cuv==1){
				nr++;
				cuv=0;
			}
		c=f.get();
	}while(c!=EOF);
	
	g<<lung/nr;
	
	
	
}