+ 1

Need your help on a test case Trip planner !

Hello guys i am totally new on this site ... i love programming but i need help to understand it, can someone help m with the Trip planner case regarding Javascript please Trip Planner 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 Explanation: It will take 150/40 = 3.75 hours to cover the distance, which is equivalent to 3.75*60 = 225 minutes.

1st May 2022, 2:13 PM
Roberto Berrios
5 ответов
+ 1
speed = distance / time. Distance and speed are given, solve formula for time and output the result (in minutes) If you need help, show your code attempt. This is supernecessary.
1st May 2022, 2:17 PM
Lisa
Lisa - avatar
0
What help you need here ? It's already explained well in description.. edit: Calculate time by distance/speed, you get in hours.. Convert the result into minutes.. Print the result...
1st May 2022, 2:16 PM
Jayakrishna 🇮🇳
0
Re-read the lessons and look at the examples. I gave you the approach in my previous reply.
1st May 2022, 2:19 PM
Lisa
Lisa - avatar
- 1
Yes but i dont know how to reflect that by coding the coding start with this: function main() { var distance = parseInt(readLine(), 10); //your code goes here ,
1st May 2022, 2:18 PM
Roberto Berrios
- 1
aha thanks Lisa! Let me try
1st May 2022, 2:19 PM
Roberto Berrios