Pagini recente » Borderou de evaluare (job #2203075) | Cod sursa (job #74372)
Cod sursa(job #74372)
#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++;
}
}
printf("%d",k/nr);
fclose(stdout);
}
int main(){
rezolvare();
return 0;
}