Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a subroutine that does the following: It asks for a person s first name and stores it in a variable It asks for a
Write a subroutine that does the following: It asks for a persons first name and stores it in a variable It asks for a persons last name and stores it in a variable It asks for the number of miles per person traveled on a recent trip and stores it in a variable It asks for the average miles per gallon the person got on the trip and stores in a variable It asks for the average price per gallon paid for gas on the tip and stores in a variable It calculates the cost of the trip and stores in a variable It displays a message such as Bob Jones traveled miles, got miles per gallon on average, paid $ per gallon on average, and paid a total of $ for gas Make sure there is an Option explicit line at the beginning of the module and that you declare all the variables appropriately.
Write a subroutine that does the following:
It asks for a persons first name and stores it in a variable
It asks for a persons last name and stores it in a variable
It asks for the number of miles per person traveled on a recent trip and stores it in a variable
It asks for the average miles per gallon the person got on the trip and stores in a variable
It asks for the average price per gallon paid for gas on the tip and stores in a variable
It calculates the cost of the trip and stores in a variable
It displays a message such as Bob Jones traveled miles, got miles per gallon on average, paid $ per
gallon on average, and paid a total of $ for gas
Make sure there is an Option explicit line at the beginning of the module and that you declare all the variables
appropriately.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered 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