Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1
Yup, its simple math. Plus it states that the code to take input is already present. So please, rack your own brain and try to figure the math out. if you have a problwm with the programming please come back.
9th Apr 2021, 10:43 AM
Slick
Slick - avatar
0
Please try stuff out. Its okay to fail
9th Apr 2021, 11:28 PM
Slick
Slick - avatar
0
thats just a math problem. The only "code-like" thing is the * for multiplication. I suggest starting the js tutorial from the beggining and working on understanding the basics of writing in that language
9th Apr 2021, 11:34 PM
Slick
Slick - avatar
0
i dont know js, but that code doesnt have a closing bracket
9th Apr 2021, 11:41 PM
Slick
Slick - avatar
0
I see you are modifying the distance input function main() { var distance = parseInt(readLine(), 10); //your code here } that code do not modify it is the way to enter the distance by console in nodejs put the code below where they indicate it to you the solution is explained in the description of the example case try to replicate that description in code, it is a mathematical formula at the end of your code put your result in console with console.log () don't forget that your code goes before the }
10th Apr 2021, 9:05 PM
Richard