Java:Do-while Loop, Even number then trying again

后端 未结 0 1945
梦毁少年i
梦毁少年i 2020-12-17 09:37

I can loop simply but it is hard for me to do a even and odd numbers only. i want it like these for example:

Enter your number: 20

2 4 6 8 10 12 14 16

相关标签:
回答
  • 消灭零回复
提交回复
热议问题