Like Tree2Likes
  • 2 Post By Salem

Water bill problem

This is a discussion on Water bill problem within the C++ Programming forums, part of the General Programming Boards category; Alright so I have most of the code written but the last part im not sure how to finish, I ...

  1. #1
    Registered User
    Join Date
    Oct 2011
    Posts
    1

    Water bill problem

    Alright so I have most of the code written but the last part im not sure how to finish, I have to add in one more variable, I for industrial use, which is $1000.00 is usage does not exceed 4 million gallons; $2000.00 is usage is mnore than 4 million gallons but does not exceed 10 million gallons; and $3000.00 if usage exceeds 10 million gallons. This is what I have so far [code] #include // to read cin, cout #include "conio.h" #include using namespace std; // CONSTANTS const double HOUSEPGAL = 0.0005; //Constant for price per gallon on house const double HOUSEINIT = 5.00; //house initial price const double FOURMIL = 4000000; //Commercial amount for 1000 const double COMINIT = 1000.00; //Commercial initial price for water const double COMADDGAL = 0.00025; //Commercial price for additional gallon int getBill (char); //main int main() { //variables char x; double Gal; double result = 0; cout Gal; cout

  2. #2
    Registered User
    Join Date
    Oct 2006
    Posts
    2,421
    it looks like you tried to use code tags. can you edit your post to fix the formatting? I think you're missing the closing code tag.

  3. #3
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,548
    Nothing to see here, already cross-posted elsewhere -> Water bill problem - C++ | DaniWeb
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Customer Bill problem
    By karipap in forum C Programming
    Replies: 6
    Last Post: 04-05-2009, 09:25 PM
  2. help about 2d water
    By mehdi0016 in forum C++ Programming
    Replies: 1
    Last Post: 05-31-2008, 02:53 PM
  3. Water On Mars
    By sean in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 04-06-2005, 06:39 PM
  4. addiction to water
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 21
    Last Post: 07-19-2002, 10:19 AM
  5. Caps On Water
    By ACIDINFO in forum C++ Programming
    Replies: 3
    Last Post: 03-03-2002, 07:22 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21