I neep help coding this project

I need help coding this project using while loops and cout/cin.. It is suppose to be one while loop for the whole thing and inside of the first while loop is the second while loop for each sale seperately. I cannot figure out how to start that?

You have been asked to write a program to calculate sales totals for a general store. Your program will not know how many products each customer will buy, so your program will have to repeat the process until the last product has been entered (use -1 for Product ID to end each sale). After each sale your program must ask if you want to do another sale (Y –continue, N – end program).
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.
Your program must take the following input:
• Product ID Number (int)
• Quantity for each item purchased (int)
• Cash Received at the end of the sale
Use the following dataset to determine the price and taxability for each item.
First Sale:
Product ID Price Quantity Taxable
101 $65.00 2 Yes
102 $12.50 1 No
103 $24.50 5 No
104 $38.75 4 Yes
105 $17.80 6 Yes
106 $16.50 2 No
107 $42.85 8 Yes
108 $32.99 2 Yes
109 $28.75 1 Yes
110 $51.55 1 No

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

Third Sale:
Product ID Price Quantity Taxable
106 $16.50 4 No
107 $42.85 3 Yes
108 $32.99 1 Yes
109 $28.75 5 Yes
110 $51.55 2 No

Calculating Tax
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.

Getting Started
You must use the starter file provided with this assignment.
What to turn in:
• A copy of your source code
• A printout of your program’s output
Did I mention I am completely! new at programming and this is a project I have to do for school
this is a project I have to do for school

In that case, you should show us what you can do, and ask specific questions on parts you need help with.
A good way to design this project is to give data on txt files that pass to application by command line arument. Make one program to work with any set of data strored in txt files. The program can load 4 arrays of data (may change Yes/No by 1/0) and make calculations.
Next step is to enclose this procces in a function.
More usefull is to use one txt file as database storage with all products and the data for every sale contains only id and quantity.
If this storage is in binary mode file, then there is no need to load arrays for products because you can take data from file like an array !!! In this case you need an exta program to store data in binary mode, or convert a text file to binary.
Please, do these steps and ask again.
Last edited on
First thing's first. Do you know any c++? I reccomend learning basic syntax before asking for help. Secondly, you're doing it for school, and because you're at school you're there to learn. Effectively, you want to have a crack at it first after learning basic c++ and if you get stuck refer to the documentation here, and if all else fails, then the forums. I am nice however, I will give you something you need to know:
you will most likely be using an integer array, either multiple or multidimensional.
Do not use floats or doubles unless you need to go into decimals.
Make the tax calculation a function seperately so it can be called multiple times. Use a boolean to check if you need to use it.
Don't mindlessly write the entire thing in main.
Topic archived. No new replies allowed.