Advertisement
Spocoman

Eiffel Tower

Oct 8th, 2024
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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 row := 0; row < n; row++ {
  13.         fmt.Println(strings.Repeat("-", n + 2) + "**" + strings.Repeat("-", n + 2))
  14.     }
  15.    
  16.     for row := 0; row < n - 3; row++ {
  17.         fmt.Println(strings.Repeat("-", n + 1) + "****" + strings.Repeat("-", n + 1))
  18.     }
  19.    
  20.     fmt.Println(strings.Repeat("-", n) + "******" + strings.Repeat("-", n))
  21.  
  22.     for row := 0; row < n - 4; row++ {
  23.         fmt.Println(strings.Repeat("-", n) + "**--**" + strings.Repeat("-", n))
  24.     }
  25.    
  26.     for row := 0; row < n - 3; row++ {
  27.         fmt.Println(strings.Repeat("-", n - 1) + "**----**" + strings.Repeat("-", n - 1))
  28.     }
  29.    
  30.     fmt.Println(strings.Repeat("-", n - 2) + strings.Repeat("*", 10) + strings.Repeat("-", n - 2))
  31.  
  32.     for row := n - 3; row > 0; row-- {
  33.         fmt.Println(strings.Repeat("-", row) + "**" + strings.Repeat("-",2 * n + 2 - 2 * row) + "**" + strings.Repeat("-", row))
  34.     }
  35.     fmt.Println("***" + strings.Repeat("-", 2 * n) + "***")
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement