C++ cash register program problem

I am just starting out in c++ and I have a project where I need to create a cash register. I do not know how to get the program to stop and calculate my total prices and everything by entering in -1. After days of working this is what I have so far.

#include <cstdlib>
#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;

int main(int argc, char *argv[])
{

int productID = 0;
char anothersale = 'x';
double price = 0.0;
double subtotal = 0.0;
double salestax = 0.0;
double total = 0.0;
double cashdrawer = 500.00;

cout << "Welcome to C++ General Store! Please enter your purchase or type -1 to quit: ";
do
{
cin >> productID;

switch (productID)
{
case 'y':
cout << "enter a new sale" << endl;
break;
case 101:
cout << "The Price is \$65.00 " << endl;
cout << "Would you like to do another sale? Y for Yes and N for No: " << endl;
break;
case 102:
cout << "The Price is \$12.50" << endl;
cout << "Would you like to do another sale? Y for Yes and N for No: " << endl;
break;
case 103:
cout << "The Price is \$24.50" << endl;
cout << "Would you like to do another sale? Y for Yes and N for No: " << endl;
break;
case 104:
cout << "The Price is \$38.75" << endl;
cout << "Would you like to do another sale? Y for Yes and N for No: " << endl;
break;
case 105:
cout << "The Price is \$17.80" << endl;
cout << "Would you like to do another sale? Y for Yes and N for No: " << endl;
break;
case 106:
cout << "The Price is \$16.50" << endl;
cout << "Would you like to do another sale? Y for Yes and N for No: " << endl;
break;
case 107:
cout << "The Price is \$42.85" << endl;
cout << "Would you like to do another sale? Y for Yes and N for No: " << endl;
break;
case 108:
cout << "The Price is \$32.99" << endl;
cout << "Would you like to do another sale? Y for Yes and N for No: " << endl;
break;
case 109:
cout << "The Price is \$28.75" << endl;
cout << "Would you like to do another sale? Y for Yes and N for No: " << endl;
break;
case 110:
cout << "The Price is \$51.55" << endl;
cout << "Would you like to do another sale? Y for Yes and N for No: " << endl;
break;
// default:
// cout << "Our apologies we no longer carry that item." << endl;
// break;
}
} while
((productID <= 110) && (productID >= 101) && (productID !=-1));

system("PAUSE");
return EXIT_SUCCESS;
}
Topic archived. No new replies allowed.