Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int n = Integer.parseInt(scanner.nextLine());
- for (int row = 0; row < n; row++) {
- System.out.println("-".repeat(n + 2) + "**" + "-".repeat(n + 2));
- }
- for (int row = 0; row < n - 3; row++) {
- System.out.println("-".repeat(n + 1) + "****" + "-".repeat(n + 1));
- }
- System.out.println("-".repeat(n) + "******" + "-".repeat(n));
- for (int row = 0; row < n - 4; row++) {
- System.out.println("-".repeat(n) + "**--**" + "-".repeat(n));
- }
- for (int row = 0; row < n - 3; row++) {
- System.out.println("-".repeat(n - 1) + "**----**" + "-".repeat(n - 1));
- }
- System.out.println("-".repeat(n - 2) + "*".repeat(10) + "-".repeat(n - 2));
- for (int row = n - 3; row > 0; row--) {
- System.out.println("-".repeat(row) + "**" + "-".repeat(2 * n + 2 - 2 * row) + "**" + "-".repeat(row));
- }
- System.out.println("***" + "-".repeat(2 * n) + "***");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement