Question: write a program - C B-1) The electricity bills (il ya) of customers are calculated as follows: 1. If 500 units or fewer are used,

write a program - C
write a program - C B-1) The electricity bills (il ya) of

B-1) The electricity bills (il ya) of customers are calculated as follows: 1. If 500 units or fewer are used, the cost is 0.02 JD per unit. Otherwise the cost is 10 JD for the first 500 units and 0.05 JD for every unit in excess(olj ) of 500. 2. A basic service fee (Susanywa, J4) of 5 JD is charged for every bill i): Write a module called ElectricityCost that takes as an argument a float number represents the consumed electricity units and prints the cost in based on the above 2 rules. ii): Write a main Module that continually asks the user to enter values of consumed units and calls the ElectricityCost module to prints the cost of each entered value. The program ends when the user enters a negative value for consumed units

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!