Question: write a C++ program 3. Water Usage Write a program that asks the user to input the total number of available gallons of water (integer).
3. Water Usage Write a program that asks the user to input the total number of available gallons of water (integer). In a loop input the number of gallons you want to use and display the remaining gallons of water. Repeat until the number of gallons as long as there are available gallons of water. At the end, display the number of days taken to finish the gallons of water. Sample run: Enter total available water in gallons: 35 How many gallons do you want to use: 13 The remaining gallons of water - 22 How many gallons do you want to use: 8 The remaining gallons of water = 14 How many gallons do you want to use: 11 The remaining gallons of water - 3 How many gallons do you want to use: 7 Sorry you can only use 3 gallons The remaining gallons of water - water is finished after 4 days
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
