good day | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

good day

why continune is not working? https://code.sololearn.com/c9WXJMJFCPMj/?ref=app

16th Feb 2021, 11:16 AM
Алмат Айтбаев
Алмат Айтбаев - avatar
2 Answers
+ 2
That's because you are not decrementing the value of number whenever it's divisible by 3(so the same thing happens again and again), try decrementing the value of number as well when it's divisible by 3 like in the snippet given below. do{ if(number % 3==0){ number--; continue; } System.out.println(number); number--; } while(number>=0);
16th Feb 2021, 11:21 AM
Rohit Kh
Rohit Kh - avatar
0
I understood you. Many thanks
16th Feb 2021, 12:21 PM
Алмат Айтбаев
Алмат Айтбаев - avatar