Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Sample output 1 Enter the gallons used ( - 1 . 0 to end ) : 1 2 . 8 Enter the miles driven: 2
Sample output
Enter the gallons used to end:
Enter the miles driven:
The miles gallon for this tank was
Enter the gallons used to end:
Enter the miles driven:
The miles gallon for this tank was
Enter the gallons used to end:
Enter the miles driven:
The miles gallon for this tank was
Enter the gallons used to end:
The overall average miles gallon was
That's all folks press any key to exit
Sample output
Enter the gallons used to end:
You have entered an invalid value for gallons, try again:
The overall average miles could not be computed
That's all folks press any key to exit
Sample output
Enter the gallons used to end:
You have entered an invalid value for gallons, try again:
You have entered an invalid value for gallons, try again:
You have entered an invalid value for gallons, try again:
Enter the miles driven:
You have entered an invalid value for miles, try again:
You have entered an invalid value for miles, try again:
The miles gallon for this tank was
Enter the gallons used to end:
You have entered an invalid value for gallons, try again:
You have entered an invalid value for gallons, try again:
You have entered an invalid value for gallons, try again:
Enter the miles driven:
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started