package cn
.tedu
.basics
;
public class Test_ForInFor {
public static void main(String
[] args
) {
for (int i
= 0; i
< 4; i
++) {
for (int j
= 4; j
> i
+ 1; j
--) {
System
.out
.print(" ");
}
for (int x
= 0; x
< i
* 2 + 1; x
++) {
System
.out
.print("*");
}
System
.out
.println();
}
for (int i
= 0; i
< 3; i
++) {
for (int j
= 0; j
< i
+ 1; j
++) {
System
.out
.print(" ");
}
for (int x
= 5; x
> 2 * i
; x
--) {
System
.out
.print("*");
}
System
.out
.println();
}
}
}
转载请注明原文地址:https://tech.qufami.com/read-13234.html