0
Can someone please help me with this task
You need to plan a road trip. You are traveling at an average speed of 40 miles an hour. Given a distance in miles as input (the code to take input is already present), output to the console the time it will take you to cover it in minutes. Sample Input: 150 Sample Output: 225
5 Respuestas
+ 2
Chidubem Nwabia
change 150 with distance variable
y = distance * 60 / 40;
+ 1
Hey Chidubem Nwabia
Can you show what you are trying to solve it ?
So that other may point out where you're making mistake(s)
+ 1
Hey Mohd Aadil
this is it
function main() {
var distance = parseInt(readLine(), 10);
//your code goes here
var x= 150/40;
var y= x*60;
console.log(y);
}
+ 1
Hey A͢J
Thank you very much.