I am not completely done with all the specs for the program but I can not get it to calculate anything but the constant variables SANITATION_FEE and STORM_WATER_FEE.
Here is a sample of what it should be doing:
Gallons Used = 16700
Meter size = 1.0
SANITATION_FEE = 20.41
STORM_WATER_FEE = 5.80
Base Water Charge for a 1.0 meter is = 6.14
Water cost = 41.79
Total = 74.14
I am not sue how to calculate water cost and base water charge in the function total cost. I cannot have any calculations in main and have to have at least three value returning functions.
There's a few really, big problems that you need to look at and prevent in the future. I'll try to point out some examples.
In your METER_SIZE function:
1 2 3
double meter_size;
if( meter_size == 0.625) // ask yourself: what is the current value of meter_size?
1 2 3
int gallons_used;
if( gallons_used <= 4000) // same thing here
As for the functions inside of int main()
1 2 3 4
base_water_charge = METER_SIZE(base_water_charge);
gallons_used = GALLONS_USED(water_cost);
total_cost = TOTAL_COST(total_cost, base_water_charge, water_cost);
// can you tell me the value of base_water_charge?