Submission

Status:

PPPPP

Subtask/Task Score:

100/100

Score: 100

User: Some1258

Problemset: คำนำหน้าชื่อ

Language: cpp

Time: 0.004 second

Submitted On: 2026-07-24 09:36:06

#include<bits/stdc++.h>
using namespace std;
int main(){
    string x;
    getline(cin,x);
    int gender, age, marry;
    cin>>gender>>age>>marry;
    if(gender==1){
        if(age>=15){
            cout<<"Mr. "<<x;
        }else{
            cout<<"Master "<<x;
        }
    }else{
        if(marry==1){
            cout<<"Mrs. "<<x;
        }else{
            cout<<"Miss "<<x;
        }
    }
}