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 i = 1; i <= n - 2; i++) {
- System.out.printf("%s||%s||%s\n", " ".repeat(n), "_".repeat(n - 2), " ".repeat( n));
- }
- System.out.printf("%s//%s\\\\%s\n", " ".repeat(n - 1), " ".repeat( n), " ".repeat(n - 1));
- for (int i = 1; i <= n - 4; i++) {
- System.out.printf("%s||%s||%s\n", " ".repeat(n - 2), "_".repeat(n + 2), ((i == (n - 3) / 2) ? "]" : ""));
- }
- System.out.printf("%s\\\\%s//%s\n", " ".repeat(n - 1), " ".repeat(n), " ".repeat(n - 1));
- for (int i = 1; i <= n - 2; i++) {
- System.out.printf("%s||%s||%s\n", " ".repeat(n), "_".repeat(n - 2), " ".repeat(n));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement