Cod sursa(job #150347)

Utilizator andrei-alphaAndrei-Bogdan Antonescu andrei-alpha Data 6 martie 2008 21:09:26
Problema Text Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.33 kb
#include <stdio.h>
char h,ch;
int main()
{
int e=0,i,rez,nrca=0,nrcuv=0;
freopen("text.in", "r",stdin);
freopen("text.out", "w",stdout);

while(!feof(stdin) )
{
scanf("%c", &ch);	
if((ch>64 && ch<91) || (ch>96 && ch<123))
	{++nrca; if(h<65  || ( h>90 && h<97) || h>122) ++nrcuv;}  
 
h=ch;
}

rez=nrca/nrcuv;
printf("%d", rez);
return 0;
}