Write a C program which uses a switch statement to input an item type (E, P, H, N or O) followed by the amount of the purchase. Apply the discount as mentioned above and determine the final cost of...


Write a C program which uses a switch statement to input an item type (E, P, H,
N or O) followed by the amount of the purchase. Apply the discount as mentioned above and
determine the final cost of the item. If an incorrect item type is entered, then output
“INVALID ITEM TYPE. In this case, do not print any final cost:


A local store sells the following types of items:<br>E > for Electrical items<br>P → for Plumbing<br>H > for hardware<br>N→ for Paint<br>0→ for Outdoor items<br>For Christmas, they offered the following sale on its items:<br>E, P, O → items were discounted 15%<br>H<br>→ items were discounted 12%<br>N<br>→ items were discounted 8%<br>Your job is to write a C program which uses a switch statement to input an item type (E, P, H,<br>N or O) followed by the amount of the purchase. Apply the discount as mentioned above and<br>determine the final cost of the item. If an incorrect item type is entered, then output<br>

Extracted text: A local store sells the following types of items: E > for Electrical items P → for Plumbing H > for hardware N→ for Paint 0→ for Outdoor items For Christmas, they offered the following sale on its items: E, P, O → items were discounted 15% H → items were discounted 12% N → items were discounted 8% Your job is to write a C program which uses a switch statement to input an item type (E, P, H, N or O) followed by the amount of the purchase. Apply the discount as mentioned above and determine the final cost of the item. If an incorrect item type is entered, then output "INVALID ITEM TYPE. In this case, do not print any final cost. Execute your program two times using the following data: Item Type Amount 428.40 L 748.28
Jun 08, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here