0

Trip planner - javascript

What am I doing wrong here? function main() { var distance = parseInt(readLine(), 10); //your code goes here var speed = 40; var time = distance/speed; } console.log(time);

11th Aug 2021, 9:17 PM
Chris
Chris - avatar
4 Réponses
+ 1
Solved. If there is any question i welcome🙂 https://code.sololearn.com/c5a5M3Tj3Jh5/?ref=app
11th Aug 2021, 10:20 PM
Matias
Matias - avatar
+ 1
hi, can you please explain why in the code it is written: var distance = parseInt(readLine(), 10); not just: var distance = 10);
25th Aug 2021, 9:21 PM
Pawel
0
Thanks! It worked!
12th Aug 2021, 5:36 PM
Chris
Chris - avatar
0
function main() { var distance = parseInt(readLine(), 10); //your code goes here var speed = 40; var time = distance/speed *60; console.log(time); } Try this it will work
20th Oct 2022, 1:46 AM
Gaddam Navanth Kumar Reddy
Gaddam Navanth Kumar Reddy - avatar