第23057题 单选题
关于C++十佳歌手去掉高低分计分程序的说法正确的是?

某学校举办“十佳歌手大奖赛”,经过选拔最终参赛选手有25人,评委10人,最终计分规则去掉一个最高分、去掉一个最低分作为该参赛选手的最终得分,并输出该得分。如果单个评委可给满分为10分,相关程序代码如下:

float total_score, max_score, min_score, now_score;
for (int i = 0; i < 25; i++) {
max_score = 0;  // 记录最高分
min_score = 10; // 记录最低分
total_score = 0; // 记录总分
for (int j = 0; j < 10; j++) {
cin >> now_score; // 录入评委打分
max_score = max(max_score, now_score); // L1
min_score = min(min_score, now_score); // L2
total_score += now_score;
}
cout << (total_score - max_score - min_score);
}
{{ option.label }}
子题{{ index + 1 }} {{ child.type_label }}
{{ option.label }}
✓ 正确 ◐ 部分正确 ✗ 错误
程序运行统计
暂无判题统计
提交{{ questionInfo.stats ? questionInfo.stats.submit_count : 0 }}次 正确率{{ statsAccuracy }}%
答案解析