- 1
Please Help
Somebody should help me with the trip planner I canât get it
10 Respostas
+ 1
Samuel Okey
This is my code.
Hope it will helps you
function main() {
var distance = parseInt(readLine(), 10);
var speed = 40
var time = 60
//your code goes here
console.log(distance/speed*time);
}
Happy coding đ
+ 1
Thank you
+ 1
Solved?
0
show. your. attempt. and. which language do you attempted?
0
Function main() {
var distance = parseInt(readLine(), 10);
var distance = 150
var speed = 40
var minutes = distance / speed
console.log(minutes *60);
}
0
Hi! why do you assign the value 150 to the distance variable? the test program itself will substitute the value. this line is superfluous in the code. delete it.
0
Ok
0
function main() {
var distance = parseInt(readLine(), 10);
//your code goes here
var distance = 590
var speed= 40
var minutes = distance/speed
console.log(minutes * 60)
}
I dont understand what the 590 come from
0
remove the distance variable from your code. generally. don't write this line. the distance variable is already declared in the two lines above. these are your input parameters. the test program will assign and insert its own data there. you just need to write the formula and display the result on the screen
0
Yeah