解题思路:
注意事项:
参考代码:
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
String inputString = scanner.next();
for (int i = 0; i < 3; i++) {
for (int j = 0; j < 2 - i; j++) {
System.out.print(" ");
}
for (int j = 0; j < 2 * i + 1; j++) {
System.out.print(inputString);
}
System.out.println();
}
}
}
0.0分
0 人评分