0
The snail climbs up 7 feet each day and slips back 2 feet each night.How many days will it take the snail to get out of a well
Depth of well = 32feet
2 Respostas
+ 2
nDays = 0
hight = 2
while hight< depth:
hight -=2
nDays += 1
hight +=5
print(nDays)
0
With just one if statment :
if (depth%5<3){
var days=depth/5;
}else{
var days=(depth/5)+1;
}
console.log(parseInt(days));