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).

write a C++ program write a C++ program 3. Water Usage Write a program that asks

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 = 0 Water is finished after 4 days

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!