Cod sursa(job #663003)

Utilizator Stefex09Stefan Teodorescu Stefex09 Data 17 ianuarie 2012 17:56:40
Problema Text Scor 20
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.36 kb
#include<cstdio>
using namespace std;
int nrcuv=0,lit=0;
char x;
bool ok;
int main()
{
	freopen("text.in","r",stdin);
    freopen("text.out","w",stdout);
	while(!feof(stdin)) {
		scanf("%c",&x);
		if( (x>='a' && x<='z') || (x>='A' && x<='Z')){
			ok=1;lit++;}
		else 
			if(ok)
				nrcuv++;
	}
	lit++;
	if(ok) nrcuv++;
	printf("%d",lit/nrcuv);
	return 0;
}