Sign in
go
/
talks
/
2f810f24ab988b98107bc78d8a71647ce9fbf085
/
.
/
2015
/
go-for-java-programmers
/
func.go
blob: 3c7a11f29e8adc4b6c6563bbb6b6f991a0aa2966 [
file
] [
log
] [
blame
]
package main
import "fmt"
// div divides n by d and returns the quotient and remainder.
func div(n, d int) (q, r int) {
// HL
return n / d, n % d
}
func main() {
quot, rem := div(4, 3)
fmt.Println(quot, rem)
}