#include <iostream>
using namespace std;

struct Score {
    char name[20];
    int math, english, korean;
};

int main() {
    Score s[5];
    int sco;

    for (int i = 0; i < 5; i++) {
        cin >> s[i].name;
        cin >> s[i].math >> s[i].english >> s[i].korean;
    }

    for (int i = 0; i < 5; i++) {
        sco = (s[i].math + s[i].english + s[i].korean) / 3;
        cout << s[i].name << "의 평균: " << sco << endl;
    }

    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: