Question: In C#, write an application which will prompt the user to enter a subtotal amount and read that value into a variable. Then prompt the

In C#, write an application which will prompt the user to enter a subtotal amount and read that value into a variable. Then prompt the user for a discount amount and read that value into a variable.

The application should then

Calculate the amount to discount from the sale (pre-tax)

Calculate the tax amount owed (post discount)

Calculate the total owed (subtotal - discount + tax owed).

Display the subtotal, discount, tax, and total owed in currency format with appropriate text descriptions.

The application should hold the output on the screen until the user enters a key.

Additional Notes:

1. Variables are declared / defined correctly (data type and name) to hold user input for

- the purchase subtotal

- the discount percentage

2. One constant is defined with the correct data type for the tax rate in Oklahoma City.

The constant name is in ALL CAPS and is initialized to the correct value to represent the 8.375% tax rate for Oklahoma city

The constant is used in tax calculations

3. Correctly perform the following:

- Prompt the user for the subtotal

- Read the subtotal

- Convert the subtotal into the correct data type

4. Correctly perform the following:

- Prompt for the discount rate so that a 10% discount is input as 10, 20% is input as 20

- Read in the rate

- Convert the rate to the correct data type

- Convert the rate to a percentage

5. Correctly calculate the discounted amount (pre-tax)

6. Use the Oklahoma City Tax Rate constant to calculate the tax owed (post discount)

7. Correctly display the following amounts using a currency format:

- Subtotal

- Discount amount

- Tax amount

- Total (=subtotal - discount + tax amount)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!