New course! Every coder should learn Generative AI!
Try a free lesson0
Why is the output of this code 246 when the condition is i<=5. Can someone explain
1 Answer
0
The output is 246 because you are using print. If you use println then output will be
2
4
6
The number is not actually 246
It is 2,4,6