Cod sursa(job #397918)

Utilizator sebistainPituscan Sebastian sebistain Data 17 februarie 2010 18:24:16
Problema Text Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.37 kb
#include<stdio.h>
int main()
{
	long long cuv=0, lit=0;
	char a;
	bool x=0;
	freopen("text.in","r",stdin);
	freopen("text.out","w",stdout);
	while(scanf("%c",&a)>0)
	{
		if((a>='a'&&a<='z')||(a>='A'&&a<='Z'))
		{
			if(!x)
			{
				cuv++;
				lit++;
			}
			else
				lit++;
		x=true;
		}
		else
			x=false;
	}
	
	printf("%lld",lit/cuv);
	return 0;
}