Question: Coding Questions Q1. Write a C program to determine the total price (including tax) of wholesale chocolate bars, based on input amount from keyboard and
Coding Questions Q1. Write a C program to determine the total price (including tax) of wholesale chocolate bars, based on input amount from keyboard and with these following conditions: The regular price for one chocolate bar is $1.99 If the customers buy the chocolate fewer than 150 bars, they will pay a regular price per bar + tax. If the customers buy 150 to 300 bars, they will receive 15% discount. . If the customers buy 301 to 500 bars, they will receive 17% discount. . If the customers buy 501 bars or more, they will receive 19% discount. The 7% sales tax is calculated after the discount. Display the total price with two decimal places. For example, if a customer buys 200 bars of chocolate: Total price - 1.07 x ($1.99 x 200) x 0.85) - $361.98 Test the program using the following data: (Screenshot your output for all four cases) 1. 100 bars 2. 200 bars 3. 500 bars 4. 1000 bars Output Dialog: How many bars of chocolate you want?: 200 Total price (+7% sales tax) $361.98
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
