As per my written codes, it's showing bugs | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

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?

18th Nov 2022, 6:10 AM
Sony
Sony - avatar
1 Answer
+ 3
Where you using input value of distance? You should use it in calculations.... Var Or var ? Later is correct syntax.
18th Nov 2022, 9:06 AM
Jayakrishna 🇮🇳