Cod sursa(job #1742484)

Utilizator ButmalaiDanButmalai Dan ButmalaiDan Data 16 august 2016 15:29:46
Problema Text Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.3 kb
#include<fstream>
using namespace std;
ifstream cin("text.in");
ofstream cout("text.out");
char x,n,prev;
int rez,k;
int main(){
	while(cin.get(x)){
	if ((x>='a'&&x<='z')||(x>='A'&&x<='Z'))rez++;
	else if ((prev>='a'&&prev<='z')||(prev>='A'&&prev<='Z'))k++;
	prev = x;
	}
	cout <<rez/k;
}