Pagini recente » Cod sursa (job #773663) | Cod sursa (job #1423514) | Cod sursa (job #787803) | Cod sursa (job #2085894) | Cod sursa (job #943665)
Cod sursa(job #943665)
#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;
}