数组 ##数组的定义与赋值: 1. var num [3]int num = [3]int{1,2,3} 2. var num [3]int = [3]int {1,2,3} 3. num := [3]int{1,2,3} 4. num :=[...]int{1,2,3} 5. num :=[...]int{4:20,7:11} //定义下表为4的值是20,下表为7的值是11 切片 切片的定义与赋值: 1. primes := [8]int{1,2,3,4,5,6,7,8} //先定义赋值出一个…