- 1
Why does it not show the number 2? 2 is prime.
6 Answers
+ 3
Because for "i = 2" the condition in if statement (that is 2%2==0 now) will be true and the loop will break on it's first iteration
+ 2
Adding an extra condition for n == 2 will work heređ
https://code.sololearn.com/cneIxJCx35BH/?ref=app
+ 1
Thanks
+ 1
Ahmad you're welcome đ
0
What is the solution for show 2?
0
I just started learning, thanks for the help