1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
#include <iostream>
using namespace std;
int main ()
{
string name;
cout << "What is your name?";
getline (cin, name);
string gender;
cout << "what is your gender?";
getline (cin, gender);
if (gender == "male")
cout << "Mr. ";
else if (gender == "female")
cout << "ms. ";
else
cout << "Dr. ";
cout << "Good Evening, " << gender << name << ".\n";
return 0;
}
|
=
[Session started at 2009-12-29 10:00:06 -0600.]
What is your name?brendan
what is your gender?male
Mr. Good Evening, malebrendan.
The Debugger has exited with status 0.
[Session started at 2009-12-29 10:01:22 -0600.]
What is your name?delilah
what is your gender?female
ms. Good Evening, femaledelilah.
The Debugger has exited with status 0.
---------------------------------------------
sorry if this is annoying....i'm working with it, but in the case that i don't get it in the next few hours, some help would be appreciated.
b