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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started