Question: c++ 2. Simple Cashier Program Note: This program can be written in many ways! Many computer programmers consider coding an art form. There is no

2. Simple Cashier Program Note: This program can be written in many ways! Many computer programmers consider coding an art form. There is no right or wrong on how you code your program but try to keep your code simple and clean! Make use of logical operators and nested if statements. You should also be commenting your code! You should always write your program step-by-step. Here is a breakdown of how your program should work: .. Display the cost of apples and oranges to the console: Apples: $0.50 each Oranges: $.75 each b. Ask the user if they wish to purchase apples or oranges. They will type an 'a'for apples or an 'o' for oranges (have proper error checking) c. Your program will then ask for the number of apples or oranges they wish to purchase (depending on if they selected apples or oranges). Due to the store's inventory, the number of apples cannot exceed 20 and the number of oranges cannot exceed 10. If the user input exceeds these maximums your program should exit with an appropriate message. Your program should then print a simple report to the console like the following: Item Qty Price Total Apples 4 $0.50 $2.00 Tax (158): $0.30 Total Cost: $2.30 e. Your program will then ask the user for the amount tendered (the amount of money given for the payment). If the amount tendered is over $100 you should tell the user that there is not enough change for such an amount and your program should exit with an appropriate message. f. If the amount tendered is appropriate, your program should end and print another simple report to the console like the following: Amount tendered: $10 Change: $7.70 Thank you for shopping with ICS
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
