Hey guys. I need help desperetley. I do not know where else to turn and need this turned in very soon! I am writing a program that accepts a value of money (an even integer value) and tells you the least amount of hundred dollar bills, fifties, twenties, tens, fives, and ones that it will take to make that total. (Example, i enter an amount of \$150 and it tells me that i have 1 one hundred dollar bill and 1 fifty dollar bill) . To do this i am writing my own function named change () and am using reference parameters. I am really having a difficult time with this program...below is some code that I have but need a lot of help and would GREATLY appreciate some help! Thanks

Code:
#include <iostream>
using namespace std;
int change(int&, int&, int&, int&, int&, int&);

int main ()

{

int money;

cout << "How much money do you have?\n";
cin >> money;

int change (int hund, int fift, int twent, int ten, int five, int one);

system ("pause");

return 0;

}

int change (int& h, int& f, int& t, int& tenn, int& f, int& o)

{
int hundred = 100;
int fifty = 50;
int twenty = 20;
int ten = 10;
int five = 5;
int one = 1;
int tothund;
int totfift;
int tottwent;
int totten;
int totfive;
int totone;

tothund = hundred / 100;
totfift = fifty / 50;
tottwent = twenty / 20;
totten = ten / 10;
totfive = five / 5;
totone = one /1;

cout << tothund << endl;
cout << totfift << endl;
cout << tottwent << endl;
cout << totten << endl;
cout << totfive << endl;
cout << totone << endl;

return  ;
}

2. Not one person can help me out?

3. There is no way change() compiles. The compiler should tell you that change() must return a value since you declared its return type to be int and yet do not return any value. Why does change() return an int if you never intend on using the return value or even providing one?

I suspect modulus arithmetic will help you solve this problem. It will tell you how many of each 'bill' type 'fits' into the total desired. From that point it is a matter of subtracting that amount from the total needed and then doing the modulus on the next smaller denom. Once you reach zero you should have the least number of bill denominations that make up the total amount.