#include<stdio.h>
int main(){
int int_score, int_sum = 0;
int int_count = 1;
float float_average;
while(int_count <= 10){
printf("Please Enter the %d student`s score: ", int_count);
scanf("%d", &int_score);
int_sum = int_sum + int_score;
int_count++;
}
float_average = int_sum / 10;
printf("the sum score is: %d\n", int_sum);
printf("the average score is: %f\n", float_average);
return 0;
}
calculate the average score
最新推荐文章于 2021-05-17 16:09:24 发布