mirror of
https://github.com/unknwon/the-way-to-go_ZH_CN.git
synced 2025-11-13 09:16:10 +08:00
Update 07.3.md and 07.6.md (#273)
* Update 07.3.md * Update 07.3.md * Update 07.6.md
This commit is contained in:
@@ -67,7 +67,7 @@ for ix := range seasons {
|
||||
|
||||
```go
|
||||
for row := range screen {
|
||||
for column := range screen[0] {
|
||||
for column := range screen[row] {
|
||||
screen[row][column] = 1
|
||||
}
|
||||
}
|
||||
@@ -89,7 +89,7 @@ b) 如果 a) 无法正常工作,写一个 for 循环让值可以 double。
|
||||
|
||||
**练习 7.7** sum_array.go
|
||||
|
||||
a) 写一个 Sum 函数,传入参数为一个 4 位 float 数组成的数组 arrF,返回该数组的所有数字和。
|
||||
a) 写一个 Sum 函数,传入参数为一个 32 位 float 数组成的数组 arrF,返回该数组的所有数字和。
|
||||
|
||||
如果把数组修改为切片的话代码要做怎样的修改?如果用切片形式方法实现不同长度数组的的和呢?
|
||||
|
||||
|
||||
Reference in New Issue
Block a user