- 1
The snail in the well calculate distance
JavaScript
3 Respostas
+ 1
Day 1: 7-2=5
Day 2: 5+7-2=10
Day 3: 10+7-2=15
Day 4: 15+7-2=20
Day 5: 20+7-2=25
Day 6: 25+7-2=32
So,on day 6 the snail will reach 32 feet and get out of the well at day without slipping back that night
You can use a loop to calculate the distance the snail cover each day,and break the loop when it reaches the desired distance
0
What about it?
0
Please answer