$\require{cancel}$

A problem.

At Bob's discount widget factory, Bob makes and sells widgets. He is really good at making and selling widgets but he is not very good at math. He has an old Timex Sinclaire su00 that he wants to use to help him with sales computations.

Bob would like you to create a simple calculator. You should read in the price of the order, then the amount that the customer has paid. Bob's customers are very nice and will always hand over at least the price of the order. Bob has trouble with change and would like you to calculate and print out the amount of change due. Bob is an optimal type of guy and would like the change to be "optimal" or the minimal number of coins needed to make change.

Bob's customers will never carry more than 32,000 pennies worth of coins. They will never have an order worth more than 32,000 pennies. Furthermore Bob has an infinite stack of each type of coin, so he can always make optimal change.

Bob lives in North West Wheresylvania where they use the following money system

The computer should ask for the price of the order in terms of pennies, flakies, and buckies. It should then ask for the amount paid in terms of pennies, flakies and buckies. Finally it should print out the amount paid, the price and the change in terms of pennies, flakies and buckies. The last three should be in optimal terms.

Oh, the way, the su00 does not support looping or if statements, or floating point arithmetic. You must use only integer operations. Strangly, it does support the GCC c++ compiler?