第19678题 单选题
关于十佳歌手大奖赛计分C++程序的相关说法,下列正确的是?

<p>某学校举办“十佳歌手大奖赛”,经过选拔最终参赛选手有25人,评委10人,最终计分规则为去掉一个最高分、去掉一个最低分作为该参赛选手的最终得分并输出,单个评委可给满分为10分,实现代码如下:</p><pre><code>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);

}</code></pre>

{{ option.label }}
子题{{ index + 1 }} {{ child.type_label }}
{{ option.label }}
✓ 正确 ◐ 部分正确 ✗ 错误
程序运行统计
暂无判题统计
知识点:
提交{{ questionInfo.stats ? questionInfo.stats.submit_count : 0 }}次 正确率{{ statsAccuracy }}%
答案解析