标签:ber nta int rgs 循环 com expand java out
public class Demo13 {
public static void main(String[] args) {
for (int i = 1; i <=5; i++) {
for (int d = 5;d>=i;d--){
System.out.print(" ");
//打印空格
}
for (int d = 1;d<=i;d++){
System.out.print("*");
//打印左边*
}
for (int d = 1;d<i;d++){
System.out.print("*");
//打印右边*
}
System.out.println();
//执行了三次循环每次打印一行
}
}
}
?
标签:ber nta int rgs 循环 com expand java out
原文地址:https://www.cnblogs.com/continue-student/p/14487700.html