# include <stdio.h> int main() { int sum = 0; int score[5] = { 0 }; //数组输入 for (int i = 0; i < 5; i++) { scanf("%d", &score[i]); sum += score[i]; } double avg = sum / 5.0; //输出 printf("%.1lf\n", avg); return 0; }
# include <stdio.h> int main() { int sum = 0; int score[5] = { 0 }; //数组输入 for (int i = 0; i < 5; i++) { scanf("%d", &score[i]); sum += score[i]; } double avg = sum / 5.0; //输出 printf("%.1lf\n", avg); return 0; }