Cod sursa(job #943665)
| Utilizator | Data | 26 aprilie 2013 08:30:42 | |
|---|---|---|---|
| Problema | Text | Scor | 60 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.51 kb |
#include<stdio.h>
char ch,lastch;
int nrcuv,chestie;
bool trbadaugat=1;
int main(){
int player_unu=0;
int nrcuv=0,chestie=0;
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
//ch=32;
while(!feof(stdin))
{
scanf("%c",&ch);
if(ch=='!'||ch==' '||ch=='.'||ch=='?'||ch==','||ch=='-')
trbadaugat=1;
if((ch>=97&&ch<=122)||(ch>=65&&ch<=90))
{
chestie++;
if(trbadaugat==1)
{nrcuv++;trbadaugat=0;}
}
}
printf("%d",chestie/nrcuv);
return player_unu;
}
