online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include<iostream> int main () { double firstnumber, secondnumber, total; std::cout << "Welcome!"; std::cout << "What would you like to do\n"; std::cout << "Enter 1 for addition\n2 for subtraction\n3 for multiplication\n4 for division\n"; int a; std::cin >> a; if (a == 1) { std::cout << "You chose Addition\n"; std::cout << "Enter the first number\n"; std::cin >> firstnumber; std::cout << "Enter the second number\n"; std::cin >> secondnumber; total = firstnumber + secondnumber; std::cout << "The answer is " << total << "\n"; } else if (a == 2) { std::cout << "You chose Subtraction\n"; std::cout << "Enter the first number\n"; std::cin >> firstnumber; std::cout << "Enter the second the number\n"; std::cin >> secondnumber; total = firstnumber - secondnumber; std::cout << "The answer is " << total << "\n"; } else if (a == 3) { std::cout << "You chose multiplictaion\n"; std::cout << "Enter the first number\n"; std::cin >> firstnumber; std::cout << "Enter the second number:\n"; std::cin >> secondnumber; total = firstnumber * secondnumber; std::cout << "The answer is " << total << "\n";; } else if (a == 4) { std::cout << "You chose division\n"; std::cout << "Enter the first number\n"; std::cin >> firstnumber; std::cout << "Enter the second number\n"; std::cin >> secondnumber; total = firstnumber / secondnumber; std::cout << "The answer is " << total << "\n";; } else { std::cout << "Invalid Input"; } }

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