- #1
jonroberts74
- 189
- 0
only had a brief intro to algorithms like this
Given an amount of money A between.01 and .99, this determines the breakdown of A into quarters (q) dimes (d) nickels (n) pennies (p)
q:=A div 25
A:=A mod 25
d:= A div 10
A:= A mod 10
n:= A div 5
p:= A mod 5
I have to trace the algorithm for A=27
Given an amount of money A between.01 and .99, this determines the breakdown of A into quarters (q) dimes (d) nickels (n) pennies (p)
q:=A div 25
A:=A mod 25
d:= A div 10
A:= A mod 10
n:= A div 5
p:= A mod 5
I have to trace the algorithm for A=27