New course! Every coder should learn Generative AI!
Try a free lesson0
Please tell me how to print all even and odd number separately in the end .
1 Answer
+ 2
You can add the even and odd numbers in two new arrays and print them at the end.
Or
Run the loop two more time with checking the conditions again.