#include <iostream>
using namespace std;
struct Student {
char name[10];
int score;
};
int main() {
Student students[3] = {
{"철수", 85},
{"영희", 92},
{"민수", 78}
};
int maxIndex = 0;
for (int i = 1; i < 3; i++) {
if (students[i].score > students[maxIndex].score) {
maxIndex = i;
}
}
cout << "최고 점수를 받은 학생은 " << students[maxIndex].name << "입니다.\n";
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: