Help writing this programm

Hey... I have this programm that I am writing for class and I am having some trouble with it. I want it to write a program to calculate sales totals for a general store. the program also has to repeat the process until the last product has been entered (use -1 for Product ID to end each sale). also At the beginning of the day, the cash drawer has $500 in it. At the end of the program you must display how much money is in the drawer after handling all your sales transactions.

program must take the following input:
• Product ID Number (int)
• Quantity for each item purchased (int)

And For those items that are taxable, assume a 7.5% sales tax. Be sure to keep a running total of tax for the each sale.

I have this much code so far. but I am stuck in some areas and the program wont compile. Please help. loop for second sale
Product ID Price Quantity Taxable
102 $12.50 1 No
103 $24.50 1 No
106 $16.50 1 No
107 $42.85 1 Yes
108 $32.99 1 Yes
109 $28.75 1 Yes



// Programmer: Jermaine Kiffin
// Date: 09/19/15
// Description: This program calculates sales tax for a series of products.

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

int main()
{
double cashDrawer = 500.00;
int productID = 0;
int quantity = 0;
double price = 0.0;
double subtotal = 0.0;
double salesTax = 0.0;
double totalSale = 0.0;
int anotherSale = 1;


// Loop for repeat sales
do
(


// Enter the first Product ID for the first sale (-1 to exit)
cout << "Enter the First product ID (-1 to exit): ";
cin >> productID;


// Main loop for each sale
While(productID != -1)
{


// Get the quantity of items
cout << "Enter the quantity of the items: ";
cin >> quantity;

// Switch statement to determine the price, and calculate sales tax, if any, for the item.
switch (productID)
{
case 101:
price = 65.0;
taxrate = 0.075;
break;
case 102:
price = 12.5;
taxrate = 0.0;
break;
case 103:
price = 24.5;
taxrate = 0.0;
break;
case 104:
price = 38.75;
taxrate = 0.075;
break;
case 105:
price = 17.80;
taxrate = 0.075;
break;
case 106:
price = 16.5;
taxrate = 0.0;
break;
case 107:
price = 42.85;
taxrate = 0.075;
break
case 108:
price = 32.99;
taxrate = 0.075;
break;
case 109:
price = 28.75;
taxrate = 0.075;
break
case 110:
price = 51.55;
taxrate = 0.0;
}


// Calculation
subtotal += price * quantity;
salesTax += quantity * price * taxRate;




// Get next Product ID
cout << "Enter the next product ID (-1 to exit): ";
cin >> productID;





} // End of while loop

totalSale = subtotal + salesTax;
cashDrawer += totalSale;


// Print properly formatted output for each sale
cout << "subtotal: $" << setw(11) << fixed << setpercision(2) << Subtotal << end1
<< " Tax: $" << setw(11) << fixed << setpercision(2) << SalesTax << end1
<< " Total: $" << setw(11) << fixed << setpercision(2) << totalSale << end1 << end1;


subtotal = 0;
salesTax = 0;
totalSale = 0;

// Another sale?
cout << "Do you want anther sale (1 - YES; 0 - NO)? ";
Cin >> anotherSale;

} while (anotherSale == 1);


// Display how much is in the cash drawer at the end

cout << "Display amount left in cash draw"
cashDrawer += totalSale;
salesTax += quantity * price * taxRate;

}
It seems you logical part is ok for me...check the syntax part...curly brackets,loop closing etc..
Topic archived. No new replies allowed.