for (int i = 1; i <= 5; i++) {
for (int k = 1; k <= i; k++) {
System.out.print(" ");
}
for (int j = 1; j <= 8; j++) {
System.out.print("*");
}
System.out.println();
}
时间: 2024-10-03 16:26:02
for (int i = 1; i <= 5; i++) {
for (int k = 1; k <= i; k++) {
System.out.print(" ");
}
for (int j = 1; j <= 8; j++) {
System.out.print("*");
}
System.out.println();
}