Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

write a program - C B-2) The Water bills (Wils) of customers are calculated as follows: 1. If 5000 liters or fewer are used, the

write a program - C
image text in transcribed
B-2) The Water bills (Wils) of customers are calculated as follows: 1. If 5000 liters or fewer are used, the cost is 0.02 JD per liter. Otherwise the cost is 10 JD for the first 5000 liters and 0.05 JD for every liter in excess(64) ) of 5000. 2. A basic service fee of 2 JD is charged for every bill. i): Write a module called waterBill 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 liters and calls the waterBill module to prints the cost of each entered value. The program ends when the user enters a negative value for consumed liters

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

Database Processing

Authors: David M. Kroenke

12th Edition International Edition

1292023422, 978-1292023427

More Books

Students also viewed these Databases questions

Question

What are the Five Phases of SDLC? Explain each briefly.

Answered: 1 week ago

Question

How can Change Control Procedures manage Project Creep?

Answered: 1 week ago