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

  Difference between the reported size of directories

What is the difference between the reported size of directories when using the command ls versus the command du? Explain.

  Design a dynamic programming algorithm

Design a dynamic programming algorithm

  Find the optimized solution to reach destination

The robot has the map of Romania with additional information given in the picture. Using A* Intelligent search how the robot will find the optimized solution to reach destination?

  Prove that the omega notation is reflexive and transitive

Prove that the omega notation is reflexive and transitive: for any functions f, g, h : N -> R?0, 1. f(n) ? ? (f(n)) 2. if f(n) ? ? (g(n)) Use the duality Rule!

  How different backgrounds work with the fonts

Your presentation should include information about font size and icons, how they look with different backgrounds, and how different backgrounds work with the fonts.

  Define static binding and dynamic binding

1. Define static binding and dynamic binding and give an example of each. Static binding occurs at compile time and dynamic binding occurs at run time. 2. Describe a situation when a history sensitive variable in a subprogram is useful.

  Calculate access time when there is cache miss

Calculate the access time when there is cache miss? Suppose that cache waits until line has been fetched from main memory and then re-executes for a hit.

  Write a program that asks the user for names of two files

write a program that asks the user for the names of two files. the first file should be opened for reading and the second file should be opened for writing . the program should read the contents of the first file, change all characters to uppercas..

  Convert the following two''s complement to decimal numbers

Convert the following two's complement representations to decimal numbers (assume 5 bit numbers). a. 11101 b. 01111 c. 10011

  Provide future of mimo

What is MIMO? What's the history? What issues are addressed? What are the goals? Identify all advantages and disadvantages of MIMO.

  Describe any evidence that was used in developing activities

Summarize briefly the changes that the program is intended to bring about (for example, increased physical activity in overweight Latino children).

  Basic business skills play a role in your professional life

How will basic business skills play a role in your professional life?

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