Advertisement
Spocoman

Cat Food Meow

Oct 4th, 2024
291
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 1.67 KB | None | 0 0
  1. package main
  2.  
  3. import (
  4.   "fmt"
  5.   "strings"
  6. )
  7.  
  8. func main() {
  9.     var n int
  10.     fmt.Scanln(&n)
  11.    
  12.     fmt.Printf("%s|", strings.Repeat(".", n - 1))
  13.  
  14.     for i := 0; i < n; i++ {
  15.         fmt.Print("\\/")
  16.     }
  17.  
  18.     fmt.Printf("|%s\n", strings.Repeat(".", n - 1))
  19.     fmt.Printf("%s|", strings.Repeat(".", n - 1))
  20.  
  21.     for i := 1; i <= 2 * n; i++ {
  22.         fmt.Print("~")
  23.     }
  24.  
  25.     fmt.Printf("|%s\n", strings.Repeat(".", n - 1))
  26.  
  27.     for i := 1; i <= n; i++ {
  28.         fmt.Printf("%s|%s", strings.Repeat(".", n - 1), strings.Repeat(" ", i - 1))
  29.  
  30.         for j := n; j >= i; j-- {
  31.             fmt.Print("{}")
  32.         }
  33.         fmt.Printf("%s|%s\n", strings.Repeat(" ", i - 1), strings.Repeat(".", n - 1))
  34.     }
  35.  
  36.     fmt.Printf("%s%s%sMEOW%s%s%s\n", strings.Repeat(".", n - 1), "|", strings.Repeat(" ", n - 2), strings.Repeat(" ", n - 2), "|", strings.Repeat(".", n - 1))
  37.     fmt.Printf("%s%s%sFOOD%s%s%s\n", strings.Repeat(".", n - 1), "|", strings.Repeat(" ", n - 2), strings.Repeat(" ", n - 2), "|", strings.Repeat(".", n - 1))
  38.  
  39.     for i := 1; i <= n; i++ {
  40.         fmt.Printf("%s|%s", strings.Repeat(".", n - 1), strings.Repeat(" ", n - i))
  41.  
  42.         for j := 1; j <= i; j++ {
  43.             fmt.Print("{}")
  44.         }
  45.         fmt.Printf("%s|%s\n", strings.Repeat(" ", n - i), strings.Repeat(".", n - 1))
  46.     }
  47.  
  48.     fmt.Printf("%s|", strings.Repeat(".", n - 1))
  49.  
  50.     for i := 1; i <= 2 * n; i++ {
  51.         fmt.Print("~")
  52.     }
  53.  
  54.     fmt.Printf("|%s\n", strings.Repeat(".", n - 1))
  55.     fmt.Printf("%s|", strings.Repeat(".", n - 1))
  56.  
  57.     for i := 0; i < n; i++ {
  58.         fmt.Print("\\/")
  59.     }
  60.  
  61.     fmt.Printf("|%s", strings.Repeat(".", n - 1))
  62. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement