Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

question The distance a vehicle travels can be calculated as follows: Distance =

ID: 441565 • Letter: Q

Question

question The distance a vehicle travels can be calculated as follows: Distance = Speed * Time For example, if a train travels 40 miles-per-hour (MPH) for three hours, the distance traveled is 120 miles (40 MPH * 3 hours = 120 miles). Write a program that asks the user for the speed of a vehicle (in miles-per-hour) and the number of hours it has traveled. It should use a loop to display the distance a vehicle has traveled for each hour of a time period specified by the user. Assumption: You may assume that the user will enter positive integer values for both the time and the distance. Here is a sample run (user input is given in <>): Please enter the vehicle

Explanation / Answer

Hi,

If i understand your question correctly, Below is the explanation

For the below input:

Please enter the vehicle