Advertisement
Spocoman

Cat Watch

Oct 4th, 2024 (edited)
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 0.93 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.     for i := 1; i <= n - 2; i++ {
  13.         fmt.Printf("%s||%s||%s\n", strings.Repeat(" ", n), strings.Repeat("_", n - 2), strings.Repeat(" ", n))
  14.     }
  15.  
  16.     fmt.Printf("%s//%s\\\\%s\n", strings.Repeat(" ", n - 1), strings.Repeat(" ", n), strings.Repeat(" ", n - 1))
  17.  
  18.     for i := 1; i <= n - 4; i++ {
  19.         if i == (n - 3) / 2 {
  20.             fmt.Printf("%s||%s||]\n", strings.Repeat(" ", n - 2), strings.Repeat("_", n + 2))
  21.         } else {
  22.             fmt.Printf("%s||%s||\n", strings.Repeat(" ", n - 2), strings.Repeat("_", n + 2))
  23.         }
  24.     }
  25.  
  26.     fmt.Printf("%s\\\\%s//%s\n", strings.Repeat(" ", n - 1), strings.Repeat(" ", n), strings.Repeat(" ", n - 1))
  27.  
  28.     for i := 1; i <= n - 2; i++ {
  29.         fmt.Printf("%s||%s||%s\n", strings.Repeat(" ", n), strings.Repeat("_", n - 2), strings.Repeat(" ", n))
  30.     }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement