Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main
- import (
- "fmt"
- "strings"
- )
- func main() {
- var n int
- fmt.Scanln(&n)
- for row := 0; row < n; row++ {
- fmt.Println(strings.Repeat("-", n + 2) + "**" + strings.Repeat("-", n + 2))
- }
- for row := 0; row < n - 3; row++ {
- fmt.Println(strings.Repeat("-", n + 1) + "****" + strings.Repeat("-", n + 1))
- }
- fmt.Println(strings.Repeat("-", n) + "******" + strings.Repeat("-", n))
- for row := 0; row < n - 4; row++ {
- fmt.Println(strings.Repeat("-", n) + "**--**" + strings.Repeat("-", n))
- }
- for row := 0; row < n - 3; row++ {
- fmt.Println(strings.Repeat("-", n - 1) + "**----**" + strings.Repeat("-", n - 1))
- }
- fmt.Println(strings.Repeat("-", n - 2) + strings.Repeat("*", 10) + strings.Repeat("-", n - 2))
- for row := n - 3; row > 0; row-- {
- fmt.Println(strings.Repeat("-", row) + "**" + strings.Repeat("-",2 * n + 2 - 2 * row) + "**" + strings.Repeat("-", row))
- }
- fmt.Println("***" + strings.Repeat("-", 2 * n) + "***")
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement