Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main
- import "golang.org/x/tour/pic"
- func Pic(dx, dy int) [][]uint8 {
- arr := make([][]uint8, dy)
- for i := range arr {
- arr[i] = make([]uint8, dx)
- for j:= range arr[i] {
- arr[i][j] = uint8((i + j) / 2)
- }
- }
- return arr
- }
- func main() {
- pic.Show(Pic)
- }
Add Comment
Please, Sign In to add comment