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