Q3. A power distribution company charges its consumers depending on the type of customer: 1- Class A or 2- Class B, the amount to be charged for Class A is based on the following: Consumption (in kwh) Charge per kwh 5 – 10.99 1 OMR 11-15.99 2 OMR 16 and above 3 OMR Class A customer is charged 7% more than Class B. Total bill is subject to 4% tax. Write a C program to input for the type of customer and the consumption. Output the total consumption, tax, and the total amount to be paid by the customer. Display all values using 3 decimal places. Add a do-while so that the program should run continuously until the user decides to stop.
please also screen shot the output with abilitey to copy the code from your answer
![Q3. A power distribution company charges its consumers depending on the type of customer:
1- Class A or 2- Class B, the amount to be charged for Class A is based on the following:
Consumption (in kwh)
Charge per kwh
5 – 10.99
1 OMR
11-15.99
2 OMR
16 and above
3 OMR
Class A customer is charged 7% more than Class B. Total bill is subject to 4% tax. Write a C
program to input for the type of customer and the consumption. Output the total consumption,
tax, and the total amount to be paid by the customer. Display all values using 3 decimal
places. Add a do-while so that the program should run continuously until the user decides to
stop.](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F6b0a8fb3-7f8a-4199-9824-72c38f39db17%2F31edf143-dfb5-4f7d-8832-91eb6110d04b%2Fp6i1f5t.png&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
C program to calculate the total payable amount by a customer on the power consumption.
There are two types of customers.
One is Class A type and the other is Class B type.
The charges for the Class A type consumption are:
The charges for Class A type customer is 7% more than the Class B type customer.
A 4% tax is applied to the total bill.
Display the total consumption, tax, and the total amount payable by a customer.
prompt the user to enter the class type.
Store the class type in the variable named customerType.
prompt the user to enter the consumption
Store the consumption in the variable named consumption.
Calculate the charges.
If the user wants to calculate the charges for class B subtract 7% from the charges.
Calculate the tax on charges.
Calculate the total amount by adding the tax amount in the consumption charges.
display the total consumption.
display the tax amount.
Display the total amount.
Use the do-while loop to run the program continued until the user wants to stop.
Step by step
Solved in 3 steps with 3 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Concepts of Database Management](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)