Skip to content

Instantly share code, notes, and snippets.

@bipin-nag
Created November 15, 2023 08:36
Show Gist options
  • Save bipin-nag/4ff7c34bb6a59ea6f77349b4fd57cc73 to your computer and use it in GitHub Desktop.
Save bipin-nag/4ff7c34bb6a59ea6f77349b4fd57cc73 to your computer and use it in GitHub Desktop.
Just another brick in the wall
package main
import "fmt"
func main() {
line := 0
for i := 0; i < 1000; i++ {
if i%20 == 0 {
fmt.Println()
line += 1
}
fmt.Print(b(line))
}
}
func b(line int) string {
odd := "┴──┬"
even := "┬──┴"
if line%2 == 0 {
return even
} else {
return odd
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment