Submission
Status:
PPPPP
Subtask/Task Score:
100/100
Score: 100
User: EXTRA
Problemset: คำนำหน้าชื่อ
Language: cpp
Time: 0.002 second
Submitted On: 2025-10-29 13:39:37
#include <bits/stdc++.h>
using namespace std;
int main() {
string s;getline(cin,s);
bool gender,ismarried;
int age;
cin>>gender>>age>>ismarried;
if(gender==1){
if(age<=15){
cout<<"Master ";
}else{
cout<<"Mr. ";
}
}else{
if(age>15&&ismarried==1){
cout<<"Mrs. ";
}else{
cout<<"Miss ";
}
}
cout<<s;
}