#include <stdio.h>
#include <stdlib.h>
int main()
{
int score[5];
int totalscore =0;
int i;
printf("Input the scores of ten students:\n");
for(i=0;i<5;i++)
{
scanf("%d",&score[i]);
totalscore =totalscore+score[i];
}
printf("The average score is %f\n",totalscore/5.0);
return 0;
}
输入十个数求十个数的平均数
最新推荐文章于 2024-05-10 23:03:36 发布