# Mathematica( Computational physics) [closed]

Make a procedure to count change. Initially, you may use Us currency, where a quarter is 25 cents, a dime is 10 cents, a nickel 5 cent, and penny is 1 cent. Given any amount of money, determine how many quarters, dimes, nickels, and pennies are required for the change. Apply it to several examples. Generalize this problem so that a quarter, dime, nickel, and penny have a value equal to an arbitrary number of cents, and solve (e.g., quarter=37 cents, dime=13 cents, nickel=8 cents, penny=1 cent). For simplicity, assume, quarter>dime>nickel>penny=1 cent.

I dont have any idea about this question. I just say I should write down this equation: money= q*0,25+0,1*d+0,05*n+0,01*p

# q=number of quarters, d= number of dimes, n=number of nickels, p= number of pennies

could someone help me how to solve it on mathematica?

-
This is clearly a plain programming problem that has nothing to do with physics at all much less with computational physics. You can find several question about this and related problems on Stack Overflow, or you might simply consider the "greedy algorithm". – dmckee Jan 29 '12 at 23:21

## closed as off topic by Qmechanic♦, dmckee♦Jan 29 '12 at 23:20

Questions on Physics Stack Exchange are expected to relate to physics within the scope defined in the FAQ. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about closed questions here.