标签:test blog mamicode oid loading log 图片 demo image
public class TestDemo {
public static void main(String[] args) {
//打印三角形
for (int i = 1; i <= 5; i++) {![](https://img2020.cnblogs.com/blog/2406104/202105/2406104-20210524230348648-800236161.png)
for (int j = 5; j >= i; j--) {
System.out.print(" ");
}
for (int j = 1;j <= i ;j++){
System.out.print("*");
}
for (int j = 1; j < i; j++) {
System.out.print("*");
}
System.out.println();
}
}
}
运行结果如下:
标签:test blog mamicode oid loading log 图片 demo image
原文地址:https://www.cnblogs.com/guoguodong/p/14806693.html