New course! Every coder should learn Generative AI!
Try a free lesson0
As per my written codes, it's showing bugs
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 my code: Var distance= parseIn(readLine() 10); time=(150/40)*60 ; console.log(time) Showing: Bugs. Would you please mention the right codes?
1 Answer
+ 3
Where you using input value of distance? You should use it in calculations....
Var Or var ? Later is correct syntax.