Having trouble finishing the if else statment. Help would be so greatly appreciated. Do i need more const? Just confused all and any information is apprieciated
Input if home use, commercial use, or industrial use
Clear screen
IF (home use)
$5.00 plus 0.0005 per gallon used
else if (commercial use)
$1000.00 for first 4 million gallons used and 0.00025 for each additional
else //industry use
$1000.00 if does not exceed 4 million but does not exceed 10 million; and $3000.00 if exceeds 10 million gallons
END IF
Display reciept
So far this is the code i am able to come up with.
#include <iostream>
#include <iomanip>
using namespace std;
void main ()
{
//local constants
const char h = Code_Home;
const char c = Code_Commercial;
const char i = Code_Industrial;
const float home = $5.00
const float home1 = $0.0005
const float commercial = $1000.00
const float commercial1 = $0.00025
const float commercial2 = 4,000,000,000
const float industrial = $1000.00
const float industrial1 = $2000.00
const float industrial3 = $3000.00
const int industrial_gallons = 10,000,000,000
//local variables
int Account_Num; //Account number
float Num_Gallons; //Number of gallons used
char Code_letter; //Code for bill
/**************************start main program*********************/
//Enter in bill type
cout <<"\n\n\n\n\n\n\n\n" ;
cout << setw (46) << "Bill Info";
cout <<"\n\n\n" ;
cout << setw (45) << "Enter Bill type : " ;
cin << Code_letter ;
cout >> setw (45) << "Account Number : " ;
cin << Account_Num ;
cout >> setw (45) << "Gallons Used : " ;
cin << Num_Gallons ;
//Clear the screen
system("cls");
//Determine Reciept
if (Code_Home)
{
h = home + home1 * Num_Gallons ;
}
else
{
if (Code_Commercial)
{
c = commercial;
}
else
{
(Code_Industrial)
i = ;
}
}