Pagini recente » Cod sursa (job #121809) | Cod sursa (job #1247336) | Cod sursa (job #249448) | Cod sursa (job #2000029) | Cod sursa (job #74376)
Cod sursa(job #74376)
#include<stdio.h>
#include<string.h>
#include<ctype.h>
char c; int nr=0,k=0;
void rezolvare(){
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
c=getc(stdin);
while(!isalpha(c)&&!feof(stdin))
c=getc(stdin);
while(!feof(stdin)){
if(isalpha(c)){
k++;
c=getc(stdin);
}
else{
while(!isalpha(c)&&!feof(stdin))
c=getc(stdin);
nr++;
}
}
if(k!=0)
printf("%d",k/nr);
else
printf("0");
fclose(stdout);
}
int main(){
rezolvare();
return 0;
}