Submission
Status:
PPPPP
Subtask/Task Score:
100/100
Score: 100
User: mameeewin
Problemset: คำนำหน้าชื่อ
Language: cpp
Time: 0.004 second
Submitted On: 2026-10-13 20:17:44
#include <iostream>
using namespace std;
int main(){
string s; getline(cin, s);
int gender, age, married; cin >> gender >> age >> married;
if (gender){
if (age<15) cout << "Master ";
else cout << "Mr. ";
} else {
if (age<15) cout << "Miss ";
else cout << (married?"Mrs. ":"Miss ");
}
cout << s;
}