Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Database Management Systems

Authors: Patricia Ward, George A Dafoulas

1st Edition

1844804526, 978-1844804528

Students also viewed these Databases questions

Question

3. How do todays organizations diff er from those of earlier eras?

Answered: 1 week ago

Question

Explain the serial-position curve and why it occurs.

Answered: 1 week ago