Cod sursa(job #470879)

Utilizator Anonymous1010Chilivercu Cristian Anonymous1010 Data 15 iulie 2010 21:07:27
Problema Text Scor 70
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.33 kb
#include<stdio.h>

char c;
int nr,l,ok;

int main()
{
	freopen("text.in","r",stdin);
	freopen("text.out","w",stdout);
	
	for(;!feof(stdin);)
	{
		scanf("%c",&c);
		
		if(('a'<=c&&'z'>=c)||('A'<=c&&'Z'>=c))
		{
			l++;
			if(ok)
				nr++,ok=0;
		}
		else
			ok=1;
		
	}
	
	
	
	printf("%d",l/nr);
	
	return 0;
}