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 15:00
Which of the following has not been attributed at least in part to social media a. drug addiction b. depression c. kidnapping d. murder
Answers: 2
question
Computers and Technology, 23.06.2019 01:50
Create a class named majors that includes an enumeration for the six majors offered by a college as follows: acc, chem, cis, eng, his, phys. display the enumeration values for the user, then prompt the user to enter a major. display the college division in which the major falls. acc and cis are in the business division, chem and phys are in the science division, and eng and his are in the humanities division. save the file as majors.java.
Answers: 2
question
Computers and Technology, 23.06.2019 06:30
You are consulting for a beverage distributor who is interested in determining the benefits it could achieve from implementing new information systems. what will you advise as the first step?
Answers: 1
question
Computers and Technology, 23.06.2019 22:50
What is an rss reader used for? for creating a user account on a social new site
Answers: 2
You know the right answer?
The distance a vehicle travels can be calculated as follows: // // distance=speed time // // for ex...
Questions
Questions on the website: 13722362