The snails | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

The snails

This code gives 2 right test cases and when i change the day from 0 to 1 the other three test cases came right and the 2 first cases came wrong. I'm little confused can you help please? function main() { var depth = parseInt(readLine(), 10); //your code goes here day=0; height=5; while (height<=depth){ day++; height+=5; } console.log(day) }

30th Dec 2021, 10:56 AM
Gehad Adel
1 Answer