Guest User

Untitled

a guest
Jul 18th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 0.32 KB | None | 0 0
  1. package main
  2.  
  3. import (
  4.     //"fmt"
  5.     "tour/pic"
  6.     //"math"
  7. )
  8.    
  9.  
  10. func Pic(dx, dy int) [][]uint8 {
  11.     retval := make([][]uint8, dy)
  12.     for i:=0; i < dy; i++ {
  13.         temp := make([]uint8, dx)
  14.         for j:=0; j < dx; j++ {
  15.             temp[j] = uint8((i+j)/2)
  16.         }
  17.         retval[i] = temp
  18.     }
  19.     return retval
  20. }
  21.  
  22.  
  23. func main() {
  24.     pic.Show(Pic)
  25. }
Add Comment
Please, Sign In to add comment