How do you do in an input and then get an output?

How do you make it so it ask you how much money you have used, and the amount of money you have left and it subtracts it and tells you how much you have left in bills?

Lets say you used $20.26 , and you originally had 40 dollars you put 20.26 as the amount you spent and then you put 40 as the original amount and it outputs it as the answer as 19.74 dollars and then it breaks it down further and tells you you have 19 dollars 2 quarters 2 dimes and 4 pennies?