Question: C programming help! Write a program that reads the electricity consumption (in kWh) and computes the electricity bill based on the following information: The first

C programming help!

Write a program that reads the electricity consumption (in kWh) and computes the electricity bill based on the following information:

The first 50 kWh costs 8.5 cents/kWh

Next 100 kWh costs 9.5 cents/kWh

Next 100 kWh costs 9.8 cents/kWh

The consumption above 250 kWh costs 10.25 cents/kWh

Additional surcharge 20% is added to the bill. The input of the program is one integer and the output will be The total bill is $., where is the price of electricity rounded to two decimal places. Example of input: 303

Corresponding output: The total bill is $34.78.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!