- public class LingXingTest {
- public static void main(String[] args) {
- for (int x = 0; x < 9; x++) {
- for (int y = x; y < 8; y++) {
- System.out.print(" ");
- }
- for (int z = 0; z <= x; z++) {
- System.out.print("* ");
- }
- System.out.println();
- }
- for (int x = 0; x < 8; x++) {
- for (int y = 0; y <=x; y++) {
- System.out.print(" ");
- }
- for (int z =x; z <8; z++) {
- System.out.print("* ");
- }
- System.out.println();
- }
- }
- }
复制代码
好吧。。。 |