How to create a nested loop that gives output as following [关闭]

问题描述 投票:0回答:0

嵌套循环给出:

0,3
0,2
0,1
1,4
1,3
3,6
3,5
3,4
4,7
4,6
6,7
int x;
int y;
outerloop:
for (x = 0; x <= 7;x=y ) {
    for (y = x + num; y <= 7; y--)
java loops for-loop nested-loops
© www.soinside.com 2019 - 2024. All rights reserved.