Sign in
go
/
tour
/
6539f1a515571891846b5c7510ab8f75c7f09ae2
/
.
/
gotour
/
solutions
/
slices.go
blob: 035f9ac3b44e6165b75d8aefb1c269df2824e353 [
file
] [
log
] [
blame
]
package main
import "tour/pic"
func Pic(dx, dy int) [][]uint8 {
p := make([][]uint8, dy)
for i := range p {
p[i] = make([]uint8, dx)
}
for y := range p {
for x, row := range p[y] {
row[x] = uint8(x * y)
}
}
return p
}
func main() {
pic.Show(Pic)
}