Sign in
go
/
website
/
9c49bacabdac7fe3bf17066dce92dbfdbaa3a065
/
.
/
_content
/
talks
/
2015
/
go-for-java-programmers
/
func.go
blob: 4001d40012c4f0153d388b5e8a24d40b460f845f [
file
] [
log
] [
blame
]
// +build ignore,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)
}