I have to write a program for computer science that takes in the total amount of goods your buying and what amount your paying with and then outputs how much change you will receive. So for example your buying something for $3.99 and you have a $5 bill then it should output "1 loonie and 1 penny".
I have no idea how to do it. I tried using modulus division but I just ended up getting even more confused.
I don't want the program I just need to know how to do it.
Thanks in advance.