#include <iostream>
#include <string> // This line allows us to create and use string objects
using namespace std;
int main()
{
cout << "Please enter your name: ";
string name;
cin >> name;
cout << "Please select your gender(f/m): ";
char gender;
cin >> gender;
// The following if conditons allows us to give different output based on the given gender of the user
if (gender == 'm') {
cout << "Hello, Mr. " << name << "!";
}
else if (gender == 'f') {
cout << "Hello, Ms. " << name << "!";
}
else {
cout << "Hello Dear " << name << "!";
}
}