forked from CPU-Code/java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBc6.java
More file actions
52 lines (46 loc) · 1.18 KB
/
Copy pathBc6.java
File metadata and controls
52 lines (46 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
package com.cpucode.java.getting.started;
/**
* 题目描述
* KiKi学会了printf在屏幕输出信息,他想输出一架小飞机。请帮他编写程序输出这架小飞机。
* 输入描述:
* 无
* 输出描述:
* **
* **
* ************
* ************
* * *
* * *
*
* @author : cpucode
* @Date : 2021/1/8
* @Time : 19:25
* @Github : https://github.com/CPU-Code
* @CSDN : https://blog.csdn.net/qq_44226094
*/
public class Bc6 {
public static void main(String[] args){
test1();
//test2(2);
}
private static void test1(){
System.out.println(" ** ");
System.out.println(" ** ");
System.out.println("************");
System.out.println("************");
System.out.println(" * *");
System.out.println(" * *");
}
private static void test2(int num){
int i;
for(i = 0; i < num; i++){
System.out.println(" ** ");
}
for(i = 0; i < num; i++){
System.out.println("************");
}
for(i = 0; i < num; i++){
System.out.println(" * * ");
}
}
}