more examples

This commit is contained in:
2021-09-07 20:21:03 +00:00
parent dbc1292105
commit bf872f0919
5 changed files with 102 additions and 0 deletions

19
gobyexample/functions.go Normal file
View File

@ -0,0 +1,19 @@
package main
import "fmt"
func plus(a int, b int) int {
return a+b
}
func plusPlus(a, b, c int) int {
return a + b + c
}
func main() {
res := plus(1, 2)
fmt.Println("1+2 =", res)
res = plusPlus(1, 2, 3)
fmt.Println("1+2+3 =", res)
}