标签:span -- ace cout nbsp min struct while main
#include <iostream> using namespace std; struct Stu { int score; string id, num; }stu; int main(){ string s1 ,s2 , s3, s4; int n, max = 0, min = 110; cin >> n; while (n--) { cin >> stu.id >> stu.num >> stu.score; if (stu.score > max){ max = stu.score; s1 = stu.id; s2 = stu.num; } if (stu.score < min){ min = stu.score; s3 = stu.id; s4 = stu.num; } } cout << s1 << ‘ ‘ << s2 << endl << s3 << ‘ ‘ << s4 << endl; return 0; }
标签:span -- ace cout nbsp min struct while main
原文地址:https://www.cnblogs.com/Hk456/p/10714272.html