Deviopath › Go

Quotient and Remainder

Medium · Functions

Go functions can return more than one value. n / d is the quotient and n % d is the remainder. Assume d != 0.

Write DivMod(n, d) that returns (quotient, remainder).

Next: Parse an Age