这个程序需要打印出 LKa_ofY
1 2 3 4 5 ;XT$rtuX
2 3 4 5 1 3I]5DW %-
3 4 5 1 2 7r>^_ aW
4 5 1 2 3 _Q QO&0Z
5 1 2 3 4 6uD Nqq
我只会下面一种方法: %.]qkGZe#
public class Array { hS<+=3
<M
/.P*%'g
tv5G']vO\
public static void main(String[] args) { voEg[Gg4%I
"8>T
int i, j, m; V i V3Y
int n = 5; |*W_
int sum = 0;
0N9`WK
for (i = 1; i <= n; i++) { K
=lm9K
for (j = 0; j < n; j++) { )\K ;Ncp[
sum = i + j; VT@,RlB0
if (sum > 5) ;pH&YB;Y
m = sum - 5; !<EQVqj6
else <