go-tour/named-results.go

14 lines
154 B
Go
Raw Normal View History

2020-02-05 03:44:36 +00:00
package main
import "fmt"
func split(sum int) (x, y int) {
x = sum * 4 / 9
y = sum - x
return
}
func main() {
fmt.Println(split(17))
}