unsigned int avg(unsigned int x, unsigned int y) { int temp; temp = (x+y)/2; return temp; } void caller() { unsigned int a=5, b=3; a = avg(a,b); } int main(){ int score[11]={0,0,0,0,0,0,0,0,0,0,0}; char *string[11]={"00-09:","10-19:","20-29:","30-39:","40-49:", "50-59:","60-69:","70-79:","80-89:","90-99:", "100:" }; int input,i; for(i=0 ;i<5;i++){ printf("Enter score %2d: ",i); scanf("%d",&input); if(input<0){;} else if(input<=9) score[0]++; else if(input<=19) score[1]++; else if(input<=29) score[2]++; else if(input<=39) score[3]++; else if(input<=49) score[4]++; else if(input<=59) score[5]++; else if(input<=69) score[6]++; else if(input<=79) score[7]++; else if(input<=89) score[8]++; else if(input<=99) score[9]++; else if(input==100) score[10]++; }//end loop for(i=0;i<11;i++){ printf("%s%d ",string[i],score[i]); if(i==4||i==9) printf("\n"); } }