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);
4 Réponses
+ 1
Solved. If there is any question i welcome🙂
https://code.sololearn.com/c5a5M3Tj3Jh5/?ref=app
+ 1
hi, can you please explain why in the code it is written:
var distance = parseInt(readLine(), 10);
not just:
var distance = 10);
0
Thanks! It worked!
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