subject

The distance a vehicle travels can be calculated as follows: // // distance=speed time // // for example, if a train travels 48 miles per hour for three hours, the distance // traveled is 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 // then call a function that uses a loop to display the number of miles the vehicle // has traveled for each hour of that time period and returns the total number of // miles traveled. / function showandcalculatedistance( speed, time) { / 25 26 // insert your code between here and the next comment block. do not alter // any code in any other part of this file. 28 31 // insert your code between here and the previous comment block. do not alter / 32 // any code in any other part of this file. 34 } 35 36 37 38 39 40 var vehiclespeed = parseint(prompt('how fast is the vehicle traveling (in miles per hour)? ')); var timetraveled = parsefloat(prompt('how long has this vehicle traveled (in hours)? var totaldistancetraveled = showandcalculatedistance(vehiclespe ed, timetraveled); alert('in ' + timetraveled + ' hours, a vehicle traveling at ' + vehiclespeed + ' miles/hour will have traveled ' + totaldistancetraveled + ' miles.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 21:00
Describir textbook icon_person mira los dibujos y describe lo que está pasando. usa los verbos de la lista.
Answers: 1
question
Computers and Technology, 23.06.2019 07:00
Why is investing in a mutual fund less risky than investing in a particular company's stock? a. mutual funds only invest in blue-chip stocks. b. investments in mutual funds are more liquid. c. mutual funds hold a diversified portfolio of stocks. d. investments in mutual funds offer a higher rate of return.
Answers: 2
question
Computers and Technology, 23.06.2019 16:00
Helen is having a meeting with her colleagues in her company. they are working on the goals and objectives for the coming year. they want to ensure that these goals and objectives of the processes involved are properly evaluated. which system can helen and her colleagues apply to evaluate this? helen and her colleagues require a blank to evaluate the goals and objectives.
Answers: 2
question
Computers and Technology, 24.06.2019 02:30
Write the pseudo code for this problem based on what you learned from the video. the purpose is to design a modular program that asks the user to enter a distance in kilometers, and then converts that distance to miles. the conversion formula is as follows: miles = kilometers x 0.6214
Answers: 3
You know the right answer?
The distance a vehicle travels can be calculated as follows: // // distance=speed time // // for ex...
Questions