Question: Program # 5 Write a program that follows these specifications: 1. The program should have a constant that stores the current Mississippi sales tax rate

Program # 5 Write a program that follows these specifications: 1. The program should have a constant that stores the current Mississippi sales tax rate as 2. The main function of the program should prompt the user for the subtotal and store this 3. The main function must call a value-returning function defined by you called a double. value in a variable. calculateSalesTax, passing the subtotal to the function by value. The calculateSalesTax function must return the sales tax based on the subtotal. You will need to store the sales tax in a variable inside your main function. 4. The main function must call a value-returning function defined by you called calculateTotal, passing the subtotal and sales tax to the function by value. The calculateTotal function must return the total based on the subtotal and sales tax. You will need to store the total in a variable inside your main function. The main function must call a void function defined by you called printReceipt that will print a simple receipt. You will need to pass the subtotal, sales tax, and total by value to this function. This function will print the subtotal, sales tax, and total. These values must be rounded to two-decimal places 5. Here's some sample output: Subtotal: $1.00 Sales Tax: $0.07 Total: $1.07
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
