1. Engineering
  2. Computer Science
  3. c coding only please...

Question: c coding only please...

Question details

C coding only please

Problem 1 (35 points): You are working at the music store whose owner wants you to write aC program to implement a discount policy and display the receipt in a certain format. Below is the table containing the customer type and percentage discount Customer Total purchase S S 100.0 Discount percentage Music Teacher 100.0 Not Teacher 6 The discount calculation is performed before the addition of the 5% sales tax The C program should let a user enter whether he/she is a music teacher and the total purchase and then display the receipt as shown in the sample code execution below Sample Code Execution #1 (Y, 100 are entered by a user) Are you a music teacher (Y or N)?: Y Enter total purchase (S): 100 Total purchase Teacher discount ( 10%) Total after discount Sales tax (5%) Total 100.00 0.00 90.00 4.50 $94.50 Sample Code Execution #2 (Y, 145.56 are entered by a user) Are you a music teacher (Y or N)?: Y Enter total purchase (S): 145.56 Total purchase Teacher discount ( 12%) Total after discount Sales tax (5%) Total $145.56 17.47 128.09 6.40 $134.50 Sample Code Execution #3 (N, 24.90 are entered by a user) Are you a music teacher (Y or N)?: N Enter total purchase (S): 24.90 Total purchase Non-Teacher discount (6%) Total after discount Sales tax (5%) Total $24.90 1.49 23.41 1.17 $24.58

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution