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());
- System.out.printf("%s|", ".".repeat(n - 1));
- for (int i = 0; i < n; i++) {
- System.out.print("\\/");
- }
- System.out.printf("|%s\n", ".".repeat(n - 1));
- System.out.printf("%s|", ".".repeat(n - 1));
- for (int i = 1; i <= 2 * n; i++) {
- System.out.print("~");
- }
- System.out.printf("|%s\n", ".".repeat(n - 1));
- for (int i = 1; i <= n; i++) {
- System.out.printf("%s|%s", ".".repeat(n - 1), " ".repeat(i - 1));
- for (int j = n; j >= i; j--) {
- System.out.print("{}");
- }
- System.out.printf("%s|%s\n", " ".repeat(i - 1), ".".repeat(n - 1));
- }
- System.out.printf("%s%s%sMEOW%s%s%s\n", ".".repeat(n - 1), "|", " ".repeat(n - 2), " ".repeat(n - 2), "|", ".".repeat(n - 1));
- System.out.printf("%s%s%sFOOD%s%s%s\n", ".".repeat(n - 1), "|", " ".repeat(n - 2), " ".repeat(n - 2), "|", ".".repeat(n - 1));
- for (int i = 1; i <= n; i++) {
- System.out.printf("%s|%s", ".".repeat(n - 1), " ".repeat(n - i));
- for (int j = 1; j <= i; j++) {
- System.out.print("{}");
- }
- System.out.printf("%s|%s\n", " ".repeat(n - i), ".".repeat(n - 1));
- }
- System.out.printf("%s|", ".".repeat(n - 1));
- for (int i = 1; i <= 2 * n; i++) {
- System.out.print("~");
- }
- System.out.printf("|%s\n", ".".repeat(n - 1));
- System.out.printf("%s|", ".".repeat(n - 1));
- for (int i = 0; i < n; i++) {
- System.out.print("\\/");
- }
- System.out.printf("|%s", ".".repeat(n - 1));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement