for 树树树!

 1 package com.stx.zx;
 2 
 3 public class W12 {
 4     public static void main ( String[] args ) {
 5         for (int h = 1; h < 6; h++) {
 6             for (int k = 5; k > h; k--) {
 7                 System.out.print(" ");
 8             }
 9             for (int x = 1; x <= h ; x++) {
10                 System.out.print(" * ");
11             }
12             System.out.println();
13         }
14 
15         for (int i = 0; i < 3; i++) {
16             for (int m = 3; m > i; m--) {
17                 System.out.print("  ");
18             }
19             for (int n = 0; n <= i; n++) {
20                 System.out.print("* * ");
21 
22             }
23             System.out.println();
24         }
25         for (int i = 0; i < 3; i++) {
26             for (int m = 3; m > i; m--) {
27                 System.out.print("  ");
28             }
29             for (int n = 0; n <= i; n++) {
30                 System.out.print("* * ");
31 
32             }
33             System.out.println();
34         }
35                 for (int i = 0; i < 4; i++) {
36             for (int j = 0; j < 4 ; j++) {
37                 System.out.print(" ");
38             }
39             for (int d = 0; d < 2; d++) {
40                 System.out.print(" * ");
41             }
42 
43             System.out.println();
44 
45         }
46     }
47 }

 

上一篇:通信编程:UDP 套接字和广播通信


下一篇:Linux CPU