Question: The following algorithm segment makes change; given an amount of money A between 10 and 99, it determines a breakdown of A into quarters (9),

The following algorithm segment makes change; given an amount of money A between 10 and 99, it determines a breakdown of A into quarters (9), dimes (d), nickels (n), and pennies (p). 9:= A div(25) A := A mod(25) d:= A div(10) A := A mod(10) n := A div(5) P:= A mod(5) (a) Trace this algorithm segment for A = 68. A = 68 9 = x A = d = A = n = x p = (b) Trace this algorithm segment for A = 87. A = 87 9 = A = d = A = n = p =
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
