提交时间:2024-05-21 19:28:35
运行 ID: 47779
#include <iostream> using namespace std; int main() { int maxNum = 0, minNum = 0x3f3f3f3f, sum = 0, x; for (int i = 0; i < 10; ++i) { cin >> x; sum += x; if (x > maxNum) { maxNum = x; } if (x < minNum) { minNum = x; } } cout << maxNum << ", " << minNum << ", " << sum / 10.0 << endl; return 0; }