Pagini recente » Cod sursa (job #1500150) | Cod sursa (job #2314779) | Cod sursa (job #1502168) | Cod sursa (job #2676261) | Cod sursa (job #132814)
Cod sursa(job #132814)
#include<stdio.h>
#include<string.h>
char s[1000000],sep[]="_ ,.?/!;\'-@#$%^&*(){}[]|:<>+~`1234567890",*a;
long long n,nr,nrc,l,i,se,j;
float r;
int main(){
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
gets(s);
n=strlen(s);
for(i=0;i<n;i++){
if(s[i]<='Z'&&s[i]>='A'||s[i]<='z'&&s[i]>='a')
nr++;
}
a=strtok(s,sep);
if(a!=NULL)
nrc++;
while(a!=NULL){
nrc++;
a=strtok(NULL,sep);
}
nrc--;
r=nr/nrc;
printf("%d",int(r));
fclose(stdin);
fclose(stdout);
return 0;
}