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.
0
Please try stuff out. Its okay to fail
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
0
i dont know js, but that code doesnt have a closing bracket
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 }