### Money counter problem.

Hey guys i have a problem. This is our original homework assignment:

 ``1234567891011121314`` ``````Write a program to display the bills and coins dispensed for check cashing store screen. The screen display should have the following format: Check Amount \$ 814.69 Cashing Fee 25.00 Amount Dispensed 789.69 Denominations Dispensed:`````` ``` # Amount --- -------- Hundreds 7 700.00 Fifties 1 50.00 Twenties 1 20.00 Tens 1 10.00 Fives 1 5.00 Ones 4 4.00 Quarters 2 .50 Dimes 1 .10 Nickels 1 .05 Pennies 4 .04 --- -------- Total Amount \$ 789.69```

Here is my code:
 ``1234567891011121314`` `````` #ifndef HEADER_H #define HEADER_H int input(); int fee(int& dollar); void bills(int& dollar, int& hundreds, int& fifties, int& twenties, int& tens, int& fives, int& ones); void coins(int& change, int& quarters, int& dimes, int& nickles, int& pennies); int display(); #endif /* HEADER_H */ ``````

Main:
 ``12345678910111213`` ``````#include "header.h" #include int main () { input(); display(); return 0; }``````

Functions:

 ``123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106`` ``````#include #include #include #include #include "header.h" using namespace std; int input() { int dollar; int change; char decimal; cout << "Input the total here: "; cin >> dollar >> decimal >> change; cout << endl; return dollar, change; } int fee(int& dollar) { int fee; if (dollar < 100) { fee = dollar - 5; } else if (dollar > 100 < 500) { fee = dollar - 15; } else if (dollar > 500 < 1000) { fee = dollar - 25; } return dollar; } void bills(int& dollar, int& hundreds, int& fifties, int& twenties, int& tens, int& fives, int& ones) { int remainingAmount = 0; hundreds = dollar / 100; remainingAmount = dollar - hundreds * 100; fifties = remainingAmount / 50; remainingAmount -= fifties * 50; twenties = remainingAmount / 20; remainingAmount -= twenties * 20; tens = remainingAmount / 10; remainingAmount -= tens * 10; fives = remainingAmount / 5; remainingAmount -= fives * 5; ones = remainingAmount; } void coins(int& change, int& quarters, int& dimes, int& nickles, int& pennies) { quarters = change / .25; change -= quarters * .25; dimes = change / .10; change -= dimes * .10; nickles = change / .5; change -= nickles * .5; pennies = change; } int display() { string divider(24, '-'); string small(3, '-'); string med(8, '-'); //cout<<"Fee Price"<

My problem is that i cannot get the amounts calculated in the bills() and coins() for the denominations to display in the display(). I have tried putting ` display(int\$ hundreds, //ect....) ` and got no results only errors. This means i dont even know for sure the calculations are even working correctly as i can not see the displayed number. Please look it over, nit pick it, call me stupid , whatever you need to do.

Thanks!
Topic archived. No new replies allowed.