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 - 3; row++) {
- System.out.println(" ".repeat(n) + "|" + " ".repeat(n));
- }
- System.out.println(" ".repeat(n - 1) + "_|_" + " ".repeat(n - 1));
- for (int row = 0; row < n - 3; row++) {
- System.out.println(" ".repeat(n - 1) + "|-|" + " ".repeat(n - 1));
- }
- System.out.println(" ".repeat(n - 2) + "_|-|_" + " ".repeat(n - 2));
- for (int row = 0; row < n - 3; row++) {
- System.out.println(" ".repeat(n - 2) + "|***|" + " ".repeat(n - 2));
- }
- System.out.println(" " + "_".repeat(n - 3) + "|***|" + "_".repeat(n - 3) + " ");
- for (int row = 0; row < n * 4 - 1; row++) {
- System.out.println(" " + "|".repeat(n - 2) + "---" + "|".repeat(n - 2) + " ");
- }
- System.out.println("_" + "|".repeat(n - 2) + "---" + "|".repeat(n - 2) + "_");
- for (int row = 0; row < n - 2; row++) {
- System.out.println("|".repeat(n * 2 + 1));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement