0
Snall in the well problem
I can't understand snell in the well ,plz understood me instead of giving the solution. Plz explain the relation between depth and the days. And plz explain everything of that .
3 Réponses
+ 1
And when the sum reaches to the input given or greater than the input break the loop
+ 1
a snail can only crawl out of a well during the day. it crawls 7 feet a day. if it has not crawled the entire length of the well, it descends 2 feet at night. and a new day begins again
0
.
Everyday the at day it is climbing 7 feet so make a variable sum for the summing the feets in a day and at night it is also coming 2 feet back so at each iteration subtract the sum by 2.