mirror of
https://github.com/gopl-zh/gopl-zh.github.com.git
synced 2025-08-05 15:12:33 +00:00
fmr code
This commit is contained in:
@@ -15,7 +15,7 @@ func name(parameter-list) (result-list) {
|
||||
func hypot(x, y float64) float64 {
|
||||
return math.Sqrt(x*x + y*y)
|
||||
}
|
||||
fmt.Println(hypot(3,4)) //"5"
|
||||
fmt.Println(hypot(3,4)) // "5"
|
||||
```
|
||||
|
||||
x和y是形參名,3和4是調用時的傳入的實數,函數返迴了一個float64類型的值。
|
||||
|
Reference in New Issue
Block a user