Cod sursa(job #1510684)

Utilizator MickeyTurcu Gabriel Mickey Data 25 octombrie 2015 15:07:03
Problema Text Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.48 kb
#include<iostream>
#include<fstream>
#include<stdio.h>
#include<string>
#include<ctype.h>
using namespace std;
char c;
int nrc, nrs, nrcuv,i;
int main() {

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

		while (f.get(c))
		
		{
			
			if ((c >= 'a'&& c <= 'z') || (c >= 'A'&& c <= 'Z'))
				nrc++;
			else
				if (c == ' ' || c == '-' ||c=='!')
					nrs++;
			
		}
	nrs--;
	nrs--;
	nrcuv = nrc / nrs;
	g << nrcuv;
	



	system("pause");
	return 0;
}