Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeffrey A. Hoffer Fred R. McFadden

4th Edition

0805360476, 978-0805360479

More Books

Students also viewed these Databases questions