+ 1

JavaScript lesson 13 "Trip Planer" . How to solve it?

I already wrote the code its correct. But as result its only "Test case 1" which is correct and there are still Test Case 2 - 5. How can I write the code for those? Cant find any solution.

7th Feb 2022, 12:13 AM
CodeX
CodeX - avatar
2 Antworten
0
With the distance and the average velocity you get the hour (distance/avrVelocity) then multiply the hour by 60 to obtain the minutes..
7th Feb 2022, 1:42 AM
Cristian Baeza Jimenez
Cristian Baeza Jimenez - avatar
0
You need to plan a road trip. You are traveling at an average speed of 40 miles an hour. Given a distance in miles as input (the code to take input is already present), output to the console the time it will take you to cover it in minutes. Sample Input: 150 Sample Output: 225
31st Jan 2023, 12:08 PM
Rajveer Kumawat