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) { short done = 0; double totalCost = 0.0d; storeMenu(); while (!done) { int item = 0; cin >> item; switch(item) { case 1: totalCost += 1.00d; break; case 2: totalCost += 1.48d; break; case 3: totalCost += 2.15d; break; case 4: totalCost += 1.89d; break; case 5: totalCost += 1.75d; break; case 6: totalCost += 0.75d; break; case 0: cout << "Your item/items total is: $" << totalCost << endl; done = 1; break; default: cout << "Invalid Selection" << endl; break; } } 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