Computer Science Homework Help

CC How Much Money It Made in A Given Day Program

 

I need an explanation for this Computer Science question to help me study.

You are writing a program for a store to calculate how much money it made in a given day. Create a variable to track the total amount of money made that day, initialized to 0. This program will then continually ask the user to choose between three options (hint: use a while loop).

  • The first option the user can select is to enter the amount of a sale. You may assume the user will enter numeric data when this option is selected. After the sale amount is entered, the program should add 6.5% to the sale amount for sales tax and print the result. This result should also be added to the running total.
  • The second option the user can select is to provide a refund. You may assume the user will enter numeric data when this option is selected. The amount the user enters should be deducted from the running total (no need to calculate tax).
    • However: Do not perform the deduction if it would cause the running total to go below $0. Instead, print a message telling the employee the refund cannot be issued and instructing them to speak to their manager.
  • Quit the program. When the user select this option, the total amount entered in sales (tax included) should print to the screen. Then the program should end.