Sign in
go
/
talks
/
456b5fca3a73edb41339aa18660233f6ded56b9a
/
.
/
2015
/
go-for-java-programmers
/
func.go
blob: c273fa361edfe0654713a1237733c5e2ddcd23ed [
file
] [
log
] [
blame
]
// +build OMIT
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)
}