Submission
Status:
PPPPP
Subtask/Task Score:
100/100
Score: 100
User: jackpapho
Problemset: คำนำหน้าชื่อ
Language: cpp
Time: 0.003 second
Submitted On: 2026-10-01 14:21:04
#include <iostream>
using namespace std;
int main(){
string s;
int sex,age,marry;
getline(cin,s);
cin >> sex >> age >> marry;
if (sex == 0){
if (age <= 15){
cout << "Miss ";
}
else {
if (marry){
cout << "Mrs. ";
}
else {
cout << "Miss ";
}
}
}
else if (sex == 1){
if (age <= 15){
cout << "Master ";
}
else {
cout << "Mr. ";
}
}
cout << s;
return 0;
}