#include <stdio.h>
void main(){
int grade[10]={95,85,45,78,68,91,90,55,48,80};
int total=0;
int i;
float avg;
for(i=0;i<10;i++){
total+=grade[i];
}
avg=((float)total/10);
printf("the student's average score is %f\n",avg);
}
#include <stdio.h>
void main(){
int grade[10]={95,85,45,78,68,91,90,55,48,80};
int total=0;
int i;
float avg;
for(i=0;i<10;i++){
total+=grade[i];
}
avg=((float)total/10);
printf("the student's average score is %f\n",avg);
}
◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。