[SOLVED] SOLVED: program to input a purchase amount and calculate the sales tax

25.00 $

Programming resource
Digital learning resource
Category:
Practical programming resource
Suitable for guided study and reference
Tutor guidance available when needed

Description

5/5 - (5 votes)

1) Write a program to input a purchase amount and calculate the sales tax and total due. The sales tax depends on the county identifying code. Counties with a number less than 20 have a 5% sales tax. The 21�35 codes have a sales tax of 6%. Codes above 35 have a sales tax of 7%. The purchase amount and county code are entered by the user. Use a loop to validate that the county code is between 10 and 40. Display the amount of the sales tax and the total.

2) Write a C# loop that counts down from 100 to 10 by 5s.

3) A department store is having a customer appreciation sale. Depending on the total dollars purchased, the customer could receive a discount on his or her total purchases. You are to develop pseudocode or C# code that will obtain the total dollars purchased from the user, determine the discount percentage, and display the total amount due. When the purchases are more than $400, the discount is 8%. When the purchases are $400 or less, the discount is 5%.

PART 2 (10 points): Create a function called calcDiscount that will calculate and return the discount amount. Write the function and call it in the code.

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.