Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main
- import "fmt"
- func main() {
- var n int
- fmt.Scanln(&n)
- for i := 0; i < n; i++ {
- angleChar := "|"
- if i == 0 || i == n - 1 {
- angleChar = "+"
- }
- fmt.Print(angleChar)
- for j := 0; j < n - 2; j++ {
- fmt.Print(" -")
- }
- fmt.Println(" " + angleChar)
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement