Cod sursa(job #211429)

Utilizator jupanu92Anonim jupanu92 Data 2 octombrie 2008 09:45:32
Problema Text Scor 10
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.34 kb
#include<stdio.h>
char c;
int nrcuv=0,nrlit=0;

int main()
{freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
scanf("%c",&c);
while(c!='\n')
    {if(c>='a' && c<='z' || c>='A' && c<='Z')
	nrlit++;
     if(c==' ' ||c=='!' ||c=='?' ||c=='.')
       nrcuv++;
     scanf("%c",&c);
    }
printf("%d ",nrlit/nrcuv);
return 0;
}