This commit is contained in:
chai2010
2016-01-02 21:17:21 +08:00
parent 8772a9c000
commit ba03c527c0
17 changed files with 63 additions and 29 deletions

View File

@@ -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類型的值。