0

Problem Snail in the well

function main() { var depth = parseInt(readLine(), 10); //your code goes here var feet = 7-2; var day = 1; while (feet <= 31) { document.write(feet + day "<br />"); feet ++; } } Struggling with problem Snail in the well

6th Mar 2021, 1:36 PM
Jonathan
2 Antworten
+ 1
function main() { var depth = parseInt(readLine(), 10); //your code goes here /*climb 7 feet and got down 2 feet.ultimately climb up 5 */ var day=depth/5; var r=Math.round(day); console.log(r); }
6th Mar 2021, 3:25 PM
Md. Nazmul Islam
Md. Nazmul Islam - avatar
2nd Apr 2021, 11:09 AM
Abdalla Bachu
Abdalla Bachu - avatar