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
5 ответов
+ 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
0
Starting a travel app involves careful planning, understanding user needs, and choosing the right technologies to offer a seamless experience. For a detailed guide on how to start a travel app successfully, this resource provides valuable insights: https://www.cleveroad.com/blog/travel-app-development/
10th Jun 2025, 3:26 PM
Соня Дрожак
Соня Дрожак - avatar