here is a simple way to do that, but i will only write a little code since it is homework:
double amount;
int dollars=0,quarters=0,dimes=0,pennies=0;
//if there is at least 1 dollar
if(amount/1 >= 1) {
//turning the equation into an int chops off any excess
dollars=(int)(amount/1);
//rest of the money to be processed by lower functions
amount=amount%1;
}
now continue that if statement for each of the variables of money descending in value. (next do quarters and use amount/.25 as the equation)
----------------------------
http://aeonofdarkness.com