Sounds like you're printing it as it is making change. Try printing when it's done instead. Also, stuff like this isn't that hard to troubleshoot if you stop and actually think. Go over what you said:
"It prints it out four times."
Well gee, that sounds like it's being printed in a loop.
Quzah.