Calculate and display the bill

Assignment Help Basic Computer Science
Reference no: EM131086083

Residential and business customers are paying different rates for water usage. Residential customers pay $0.004 per gallon for the first 8000 gallons. If the usage is more than 8000 gallons, the rate will be $0.007 per gallon after the first 8000 gallons. Business customers pay $0.005 per gallon for the first 10000 gallons. If the usage is more than 10000 gallons, the rate will be $0.009 per gallon after the first 10000 gallons. For example, if a business customer has used 12000 gallons, they need to pay $50 for the first 10000 gallons ($0.005 * 100000), plus $18 for the other 2000 gallons ($0.009 * 2000). Write a program to do the following. Ask the user which type the customer it is and how many gallons of water have been used. Calculate and display the bill.

Reference no: EM131086083

Questions Cloud

Brainstorming process for final project : The topic for this is best practices for creating a network diagram. Begin the brainstorming process for final project. This is not the final project just answer the following questions:
What are the marginal tax rates faced by the two families : Suppose the income tax rate is 10 percent on the first $10,000; 10 percent on the next $20,000; 20 percent on the next $20,000; 30 percent on the next $20,000; and 40 percent on all income above $70,000. Family A has income of $82,000 while Family B ..
Prove that this network is non-blocking : Consider the network built as follows. Take the image of a butterfly in a vertical mirror, and append this mirror image to the output of a butterfly. Hence, for n inputs and outputs, there will be 2log2n stages. Prove that this network is non-bloc..
Competitive market surplus : Competitive Market Surplus. Suppose demand and supply conditions in the competitive market for unskilled labor are as follows: P = $15 ? 0.3QD (Demand) P = $3 + $0.1QS (Supply) where Q is millions of hours of unskilled labor and P is the wage rate pe..
Calculate and display the bill : Write a program to do the following. Ask the user which type the customer it is and how many gallons of water have been used. Calculate and display the bill.
The new rule fully in effect-value of consumer surplus : Assume that the market for beef in a small and isolated community is described by the following two equations: Q = -150 +150*P and Q = 600, where Q represents quantity and P is price. Similarly, assume that the market for beef is described by the fol..
According the criteria for the final project : Extend Project 1 to use advanced data structures and support sorting on various keys. The project will be graded according the criteria for the final project - see below.
Default settings on a wireless router : 1. Which Internet access method can be affected by the number of people concurrently online in a neighborhood? 2. For which of these items should you always change the default settings on a wireless router?

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identify darwin two basic layers

1. Identify the four primary layers in the functional view of OS X ? 5. What is Darwin ? Identify Darwin's two basic layers ?

  Create method takes two integers input parameters and cheks

Create a method that takes two integers input parameters and checks whether one number is divisible by the other

  Cloud computing to the rescue

Cloud Computing to the Rescue,  Describe the hardware, software, and network architectural design of the infrastructure used to build cloud computing infrastructures. Use Microsoft Visio to generate the architectural diagrams.

  Design and implement a graphical user interface (gui)

Design and implement a graphical user interface (GUI) that lets a user draw geometric objects such as rectangles, circles or line segments. The geometric objects are two be "entered" with clicks of the mouse

  Cybersecurity plays in your use of that technology

Write a 3-4 page paper plus cover page on How information technology affects your everyday life and what role do you think Cybersecurity plays in your use of that technology. Write in APA 6th Edition

  Design a scheme to prevent messages from being modified

Random J. Protocol-Designer has been told to design a scheme to prevent messages from being modified by an intruder.

  Portion of the driver license exam

The local driver's license office has asked you to design a program that grades the written portion of the driver's license exam. The exam has 20 multiple choice questions. Here are the correct answers:

  Write a program which includes a user defined function

write a program which includes a user defined function named Upper. The function is passed a single char. It will return 1 if the char is upper case, i.e. between 'A' and 'Z'. it will return 0 otherwise.

  The flyandstay ltd system case study

Your software house decided to design and build the system using the object-oriented methodology, to allow for more flexible design/build iterations and re-use of design and code. You have therefore now been asked to produce the analysis and desig..

  Lan device

Your wireless LAN device has just sent a request to send (RTS). What happens next?

  Express e and f in sum-of-minterms algebraic form

Express E and F in sum-of-minterms algebraic form.

  Show how rsa can be used for two-way authentication

Show how RSA can be used for two-way authentication.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd