+ 4
Trip planner
It’s not running 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); } function main() { var distance = parseInt(readLine(), 10); //your code goes here var distance2 = 100 var speed2 = 40 var minutes2 = distance2 / speed2 console.log(minutes2 *60) }
18 Answers
+ 32
Use this :
function main() {
var distance = parseInt(readLine(), 10);
//your code goes here
var speed = 40
var time = 60
var minutes = distance/speed
console.log(minutes*time)
}
+ 17
Emmanuel Osemudiamen , the purpose of the task is not to give certain values like 590 or 100 as input and call the function by yourself many times. The input value is distance. Just perform the calculation this way:
function main() {
var distance = parseInt(readLine(), 10);
//your code goes here
var speed = 40
var minutes = distance / speed;
console.log(minutes *60);
}
+ 3
Your welcome
+ 1
function main() {
var distance = parseInt(readLine(), 10);
var output = distance/40;
console.log(output*60);
}
main(150);
0
function main() {
var distance = parseInt(readLine(), 10);
// readLine() means it will take users input, 10 indicate base 10 numeral system.
// parseint() returns the integer of the number.
var speed = 40
var time = 60
console.log((distance/speed)*time);
}
0
Rahfi, thanks man for a superb easy method.
0
function main() {
var distance = parseInt(readLine(), 10);
//your code goes here
var x= distance/40;
var y=60;
console.log(x*y)
}
0
function main() {
var distance = parseInt(readLine(), 10);
//your code goes here
var speed= distance/40;
var time=60*speed;
console.log(time)
}
0
function main() {
var distance = parseInt(readLine(), 10);
//your code goes here
var miles = 40;
var minutes = distance / miles;
console.log(distance / 40 * 60)
}
its working
0
That is Simple : average speed of 40 miles an hour, so 60 is 1.5 times of 40 . think simply 😎😎😎😎😎😎
function main() {
var distance = parseInt(readLine(), 10);
//your code goes here
var time = distance*1.5;
console.log(time);
}
0
what's meaning of (readline(),10)?
didn't understand for it
0
💯
function main() {
var distance = parseInt(readLine(), 10);
//your code goes here
var speed = 40
var time = 60
var minutes = distance/speed
console.log(minutes*time)
}
0
function main() {
var distance = parseInt(readLine(), 10);
//your code goes here
var speed=40;
var time=distance/speed;
var minutes=time*60;
console.log(minutes);
}
0
function main() {
var distance = parseInt(readLine(), 10);
//your code goes here
var speed = 40;
var time = 60;
var minite = distance/speed;
var total = minite * time;
console.log(total);
}
You should Try This.!!
0
function main() {
var distance = parseInt(readLine(), 10);
// readLine() means it will take users input, 10 indicate base 10 numeral system.
// parseint() returns the integer of the number.
var speed = 40
var time = 60
console.log((distance/speed)*time);
}
0
MD RAKIBUL HASSAN NAYON thanks
0
Im too lazy to write everything so my answer to this is
let x = parseInt(readLine(), 10);
console.log((x/40) * 60);
- 4
rafi are you there