Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Need this in done in QB64. I only need the coding aspect completed, please. Write a program, which will help users calculate their car's miles
Need this in done in QB64. I only need the coding aspect completed, please.
Write a program, which will help users calculate their car's miles per gallon. Your program should allow a user to enter the number of miles driven and the number of gallons of gas used. The output should be the miles per gallon. Use a Do While (post-test) loop to allow users to enter as many sets of data as desired In your solution, be sure to include the following. A welcome message to the user Comments in the pseudocode Data validation loops for each number entered by the user (see YouTube video regarding data validation loops). These loops should continue as long as the input is not valid Ensure that your program cannot have a "division by zero" error Turn in the pseudocode and flowchart for this problem (Visio file) AND the QBasic program (.bas file) Sample input/output This program calculates the MPG for your vehicle. Enter the miles driven (must be greater than ): ? 234.5 Enter the gallons used (must be greater than 0); ? 11.6 Miles per gallon = 20.21552 Want to calculate again? CYN) Enter the miles driven (must be greater than 0) Enter the miles driven must be greater than 0); 56 Enter the gallons used must be greater than 0): Enter the gallons used (must be greater than 0); iles per gallon = 28 want to calculate again? (Y/N) Write a program, which will help users calculate their car's miles per gallon. Your program should allow a user to enter the number of miles driven and the number of gallons of gas used. The output should be the miles per gallon. Use a Do While (post-test) loop to allow users to enter as many sets of data as desired In your solution, be sure to include the following. A welcome message to the user Comments in the pseudocode Data validation loops for each number entered by the user (see YouTube video regarding data validation loops). These loops should continue as long as the input is not valid Ensure that your program cannot have a "division by zero" error Turn in the pseudocode and flowchart for this problem (Visio file) AND the QBasic program (.bas file) Sample input/output This program calculates the MPG for your vehicle. Enter the miles driven (must be greater than ): ? 234.5 Enter the gallons used (must be greater than 0); ? 11.6 Miles per gallon = 20.21552 Want to calculate again? CYN) Enter the miles driven (must be greater than 0) Enter the miles driven must be greater than 0); 56 Enter the gallons used must be greater than 0): Enter the gallons used (must be greater than 0); iles per gallon = 28 want to calculate again? (Y/N)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