|
|
Texan40 wrote: |
---|
putting 'void selectMenu();' inside the do loop is wrong. You already declared the function above you just need to define what that function does (outside of main()) |
|
|
double depositMoney(double mon); //this function will simulate deposit transaction //this function will update the balance once a successful //deposit transaction occured. //this function should not allow deposit if amount to deposit is from 100.00 to 400.00 //for the program not to terminate in this case, perform a do while loop to validate the deposit amount and as the user to re enter amount of 500 and/or above . |
double depositMoney( deposit, &total_balance ) { while the user is not entering an amount lower than 100 en larger than 400, keep asking for the amount to be deposited if it is between 100 and 400, increase total_balance by the amount of deposit } |
void widrawMoney(double & WMoney); //this function will simulate withdraw transaction //balance should be updated once a success withdraw transaction occurred. //this function should not allow withdrawal if amount to withdraw is less than 500.00 //maximum withdrawal amount is 5000.00 //withdrawal amount should be displayed with the following breakdown: 100,200,500, and 1000 |
void widrawMoney(double & WMoney) { if withdrawal amount is smaller than 5000 and bigger then 500 then: use the % operator to break down the amount, for example, 2800: 2800 / 1000 = 2, 2800%1000 = 800 800 / 500 = 1, 800%500 = 300 300 / 200 = 1, 300%200 = 100 100 / 100 = 1 Hence, two bills of 1000, one of 500, one of 200 and one of 100 will be presented. } |