Cod sursa(job #738359)

Utilizator binicBinica Nicolae binic Data 20 aprilie 2012 14:13:53
Problema Text Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.37 kb
#include<stdio.h>
#include<string.h>
int i,z,y,s,u;
char x;
int main()
{
	freopen("text.in","r",stdin);
	freopen("text.out","w",stdout);
	scanf("%c",&x);
	i=0;
	while(EOF)
	{
		if(x<='z'&&x>='a'||x<='Z'&&x>='A'){z++;s++;}
		else if((x>'z'||x<'a'||x>'Z'||x<'A')&&s>0){s=0;u++;}
		i++;
		y=scanf("%c",&x);
		if(y!=1)break;
	}
	printf("%d",z/u);
	return 0;
}