online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> using namespace std; void storeMenu(); int main(int argc, char **argv) { double totalCost = 0.0d; storeMenu(); while (1) { int item = 0; cin >> item; if (item == 1) { totalCost += 1.00d; } else if (item == 2) { totalCost += 1.48d; } else if (item == 3) { totalCost += 2.15d; } else if (item == 4) { totalCost += 1.89d; } else if (item == 5) { totalCost += 1.75d; } else if (item == 6) { totalCost += 0.75d; } else if (item == 0 ) { cout << "Your item/items total is: $" << totalCost << endl; break; } else { cout << "Invalid Selection" << endl; } } return 0; } void storeMenu(){ cout << "1 - Soda: $1.00" << endl; cout << "2 - Bagel: $1.48"<< endl; cout << "3 - Coffee: $2.15"<< endl; cout << "4 - Scone: $1.89"<< endl; cout << "5 - Orange Juice: $1.75"<< endl; cout << "6 - Muffin: $0.75"<< endl; cout << "0 - Quit"<< endl; cout << "Enter the item number that you want: " << endl; }

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