Duplicate Question
The question on this page has been marked as a duplicate question.
Original Question
A store uses the following policy to award discount. If the customer purchases products costing more than ksh 30,000 she is giv...Asked by andrew
A store uses the following policy to award discount. If the customer purchases products costing more than ksh 30,000 she is given a discount of 10%, otherwise she is given a discount of 2%. Write a complete C++ program that allows a user to input the total value of purchases then the program computes and outputs the discount a customer will receive.
Answers
Answered by
Steve
I assume you can do the I/O
The calculation is
discount = (purchases > 30000) ? 0.10 : 0.02;
drop that into a while loop and The I/O and you're done
The calculation is
discount = (purchases > 30000) ? 0.10 : 0.02;
drop that into a while loop and The I/O and you're done
There are no AI answers yet. The ability to request AI answers is coming soon!
Submit Your Answer
We prioritize human answers over AI answers.
If you are human, and you can answer this question, please submit your answer.