0
JavaScript road trip challenge
can you plz solve first challenge of JavaScript i did not understand the road trip challenge because it is not letting console how to print plz help me
11 Respuestas
+ 3
Just write this into your code
console.log((distance/40) * 60)
+ 1
Please show your attempt first
+ 1
function main() {
var distance = 40;
parseInt(readLine(), 10);
//your code goes here
var miles = 150;
var result = (miles / distance);
}
+ 1
They give me function already
+ 1
Sorry I forgot ti say can you also post the challenge 😅
+ 1
Gahahha ok wait
+ 1
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
+ 1
Explanation: It will take 150/40 = 3.75 hours to cover the distance, which is equivalent to 3.75*60 = 225 minutes
+ 1
function main() {
var distance =
parseInt(readLine(), 10);
//your code goes here
}
+ 1
🔥🅳🅴🆅 🆂🅷🅸🆅🅽🅰🅽🅳🅰🅽 🅼🅸🆂🅷🆁🅰🔥 thank you so much brother clear ha
+ 1
Ahmad Taghavi thank you sloved