题库 信息学奥赛题库 题目列表 #include <iostream>using namespace std;int m...
填空题

#include <iostream>

using namespace std;

int main() {

int max, min, sum, count = 0;

int tmp;

cin >> tmp;

if (tmp == 0)

return 0;

max = min = sum = tmp;

count++;

while (tmp != 0) {

cin >> tmp;

if (tmp != 0) {

sum += tmp;

count++;

if (tmp > max)

max = tmp;

if (tmp < min)

min = tmp;

}

}

cout << max << "," << min << "," << sum / count << endl;

return 0;

}

输入: 1 2 3 4 5 6 0 7

输出:_________

题目信息
阅读程序 2016年 初赛
-
正确率
0
评论
196
点击