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; coutStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started