Submission
Status:
PPPPP
Subtask/Task Score:
100/100
Score: 100
User: samsenpisardmoo
Problemset: คำนำหน้าชื่อ
Language: cpp
Time: 0.003 second
Submitted On: 2025-10-09 11:09:14
#include <bits/stdc++.h>
using namespace std;
int main()
{
string n;
bool sex;
int age;
bool wedding;
getline(cin,n);
cin >> sex >> age >> wedding;
if(age<15)
{
if(sex) cout << "Master " << n;
else cout << "Miss " << n;
}
else
{
if(sex) cout << "Mr. " << n;
else
{
if(wedding) cout << "Mrs. " << n;
else cout << "Miss " << n;
}
}
}