Question: working in c++, i have to create a bookstore program that allows a user to buy a number of books. Shown in the code above,

working in c++, i have to create a bookstore program that allows a user to buy a number of books. Shown in the code above, the customer is asked to enter the cost of the book, whether it's a hard copy, if they want a discount and then they can choose to enter "c" to check out another book (and hence restart the loop) or press any other key and this will print a order report (the part immediantly after the while loop). If they choose to check out another book the integer "checkedOut" is incremented and the loop restarts.
The loop doesn't seem to work though, any suggestions as to why? thanks!
while ((actionl -- c (actioni -- )) cout"customer 1. ation; if (action .. .h" Il action .. .. totali (cost5): else totali (cst2): cout"enter \"d\" if custoner recieves a discount. any other key if they don't:" endl; cin acticn; if (action d) totalz (totall (tctali-.1)) else totalz totali; cout
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
