- 1

Can someone help me with this task, please

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

24th Feb 2022, 12:18 PM
Chidubem Nwabia
Chidubem Nwabia - avatar
1 Resposta
+ 1
you have to do general stuff. you have to do the (input/40)*60 then output the answer to the console, like this: function main() { var distance = parseInt(readLine(), 10); //your code goes here var result=((distance/40)*60) console.log(result) }
24th Feb 2022, 11:46 PM
CompletelyAnonymous
CompletelyAnonymous - avatar