online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#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 << "!"; } }

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue