Submission

Status:

PPPPP

Subtask/Task Score:

100/100

Score: 100

User: bossc

Problemset: คำนำหน้าชื่อ

Language: cpp

Time: 0.002 second

Submitted On: 2026-05-10 13:48:58

#include <bits/stdc++.h>
using namespace std;
int main() {
    string firstname,surname;
    int gender,age,status;
    cin >> firstname >> surname >> gender >> age >> status;
    if (gender == 0) {
        if (status == 1) {
            cout << "Mrs. ";
        }
        else {
            cout << "Miss ";
        }
    }
    else {
        if (age < 15) {
            cout << "Master ";
        }
        else {
            cout << "Mr. ";
        }
    }
    cout << firstname << " " << surname;
}