go-tour/array.go

15 lines
215 B
Go
Raw Permalink Normal View History

2020-02-05 03:44:36 +00:00
package main
import "fmt"
func main() {
var a[2] string
a[0] = "Hello"
a[1] = "World"
fmt.Println(a[0], a[1])
fmt.Println(a)
primes := [6]int{2, 3, 5, 7, 11, 13}
fmt.Println(primes)
}