package Test;
public class Test14 {
public static void main(String[] args) {
int temp, a = 1, b = 2;
for (int i = 0; i <= 4; i++) {
a += i;
temp = a;
System.out.print(a + " ");
for (int j = b; j <= 5; j++) {
a += j;
System.out.print(a + " ");
}
b++;
a = temp;
System.out.print("\n");
}
}
}
编程输出如下数字图案:1 3 6 10 15 2 5 9 14 4 8 13 7 12 11
于 2022-02-20 17:45:35 首次发布