- 2
please,help me(in java script)
function main() { var distance = parseInt(readLine(), 10); //your code goes here }l
6 Antworten
+ 2
Can you please tag "javascript"?
Is it a task from the sololearn course? Which one is it? What's the task?
+ 2
We cant help you if we dont know what code need to do.
Post more about it.
+ 2
There is no code to be corrected. Where is your own code? Can you please put it on playground and link it?
+ 1
Time = distance / speed, your distance is given by inputs, speed is given in task (40 miles per hour)
And result of time will be per hour, so convert to minutes. So result * 60 to got per minutes
Some of "practice" use some formula to solve, if you dont know formula its fine to use internet and look for it. In programming we need to know how to use this formula in our code, no need to make our own if it already exist.
0
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
0
these code needs to be corrected