mirror of
https://github.com/unknwon/the-way-to-go_ZH_CN.git
synced 2025-08-12 04:48:29 +08:00
update book code
This commit is contained in:
13
eBook/exercises/chapter_7/for_array.go
Executable file
13
eBook/exercises/chapter_7/for_array.go
Executable file
@@ -0,0 +1,13 @@
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
func main() {
|
||||
var arr [15]int
|
||||
for i:=0; i < 15; i++ {
|
||||
arr[i] = i
|
||||
}
|
||||
fmt.Println(arr) // [0 1 2 3 4 5 6 7 8 9 10 11 12 13 14]
|
||||
|
||||
|
||||
}
|
Reference in New Issue
Block a user