Gat a problem with the "Land Ho" code cach challenge | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Gat a problem with the "Land Ho" code cach challenge

var position= parseInt(prompt())+1; let time= 10 for(i=0;i<position;i++){ if (position<20){ console.log(`${time} minutes`) break; } else{ position -=20 time+=20 } }

23rd Jan 2023, 1:20 PM
Kizito David
Kizito David - avatar
5 Answers
+ 3
Kizito David interesting way quite complex but not impossible: https://code.sololearn.com/WAgIzxkc5X3U/?ref=app
23rd Jan 2023, 5:56 PM
JaScript
JaScript - avatar
+ 2
Hwres tge question You are on a large ship and you put down anchor near a beautiful beach. There is a small boat ferrying passengers back and forth, and you get in line for it. How long will you have to wait to get to the beach? You know that 20 people can fit on the boat and each trip to shore takes 10 minutes each way.
23rd Jan 2023, 1:22 PM
Kizito David
Kizito David - avatar
+ 2
What exactly is your problem and the trouble you are having?
23rd Jan 2023, 2:31 PM
Justice
Justice - avatar
+ 2
Justice bro it was when u put slme values it doesn't work like 80, 100 but have solevd it using JaScript code
10th Feb 2023, 6:10 AM
Kizito David
Kizito David - avatar
+ 2
Thanks all of u guyz
10th Feb 2023, 6:10 AM
Kizito David
Kizito David - avatar