go-tour/named-results.go
2020-02-04 21:44:36 -06:00

14 lines
154 B
Go

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))
}