Submission
Status:
PPPPP
Subtask/Task Score:
100/100
Score: 100
User: Alif_Sama
Problemset: คำนำหน้าชื่อ
Language: cpp
Time: 0.002 second
Submitted On: 2025-10-09 08:48:15
#include <iostream>
using namespace std;
int main() {
string name,surname;
int gender,age,m;
cin >> name >> surname;
cin >> gender >> age >> m;
if (gender == 1) {
if (age < 15) {
cout << "Master ";
} else {
cout << "Mr. ";
}
} else {
if (age < 15) {
cout << "Miss ";
} else {
if (m == 0) {
cout << "Miss";
} else {
cout << "Mrs. ";
}
}
}
cout << name << " " << surname;
}