mirror of
https://github.com/unknwon/the-way-to-go_ZH_CN.git
synced 2025-08-12 01:21:38 +08:00
添加06.2.md和相关的例子与问题解答
This commit is contained in:
15
eBook/examples/chapter_6/simple_function.go
Normal file
15
eBook/examples/chapter_6/simple_function.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
func main() {
|
||||
fmt.Printf("Multiply 2 * 5 * 6 = %d\n", MultiPly3Nums(2, 5, 6))
|
||||
// var i1 int = MultiPly3Nums(2, 5, 6)
|
||||
// fmt.Printf("MultiPly 2 * 5 * 6 = %d\n", i1)
|
||||
}
|
||||
|
||||
func MultiPly3Nums(a int, b int, c int) int {
|
||||
// var product int = a * b * c
|
||||
// return product
|
||||
return a * b * c
|
||||
}
|
Reference in New Issue
Block a user