日期:2014-05-20 浏览次数:20846 次
public class Test {
public static void main(String[] args) {
int n = 5;
for (int i = 0, k = -n + 1; i < n; i++) {
for (int j = k; j < n; j++) {
System.out.print(i > Math.abs(j) ? 0 : n - Math.abs(j) + i);
}
System.out.println();
}
}
}