Playing with ranges
This commit is contained in:
parent
dd64e484a5
commit
92cd405b2e
13
gotime/src/ranges.go
Normal file
13
gotime/src/ranges.go
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
import "fmt"
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
pow := make([]int, 10)
|
||||||
|
for i := range pow {
|
||||||
|
pow[i] = 1 << uint(i)
|
||||||
|
}
|
||||||
|
for _, value := range pow {
|
||||||
|
fmt.Printf("%d\n", value)
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user