previous
|
index
|
next
Solution: Computing Quotients
Use two facts:
if
n < d
, then
d
divides
n
zero times
otherwise,
d
divides
n
one more time than it divides
(n - d)
Mathematically:
quot(n,d)
=
0 if n<d
=
1 + quot(n-d,d) otherwise
previous
|
index
|
next