JAVA编程
1121
12321
1234321
123454321
12345654321
1234567654321
123456787654321
12345678987654321
哪位大佬教教我这个怎么写呢
程序代码:class Untitled {
/**
* 分析:三角阵的起点可模拟坐标系实现,简化代码
* */
public static void main(String[] args) {
for(int i=0;i<=9;i++){
for(int j=-9;j<=9;j++){
if(i>j&&i+j>0){
int r = Math.abs(i);
int c = Math.abs(j);
System.out.print(r>c?r-c:c-r);
}
else
System.out.print(" ");
}
System.out.println();
}
}
}