- 1

What i am doing wrong?

I am not so good at it and i am lost. I cant figure this out how to finish to the corect answer :)

21st Jun 2021, 11:22 AM
Edgaras Starkutis
Edgaras Starkutis - avatar
5 Answers
+ 1
You're gunna have to tell us what language and/or show us your code.
21st Jun 2021, 11:28 AM
Slick
Slick - avatar
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 with the given depth? Sample Input: 31 Sample Output: 6 Explanation: Let's break down the distance the snail covers each day: 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=32 So, on Day 6 the snail will reach 32 feet and get out of the well at day, without slipping back that night. Coding language: Javascript Coding chalabge snail in well.
21st Jun 2021, 11:29 AM
Edgaras Starkutis
Edgaras Starkutis - avatar
0
function main() { var depth = parseInt(readLine(), 10); //your code goes here for(var i=0; i < depth; i++) { var result = i + 7 - 2; var score = } } main()
21st Jun 2021, 11:30 AM
Edgaras Starkutis
Edgaras Starkutis - avatar
0
This is what i got sooory its been a week and i cant compleate this chalange :/
21st Jun 2021, 11:31 AM
Edgaras Starkutis
Edgaras Starkutis - avatar