Question: Write a function dispense _ bills ( ) . The function determines the minimum number of bills to dispense given a withdrawal amount. The possible
Write a function dispensebills The function determines the minimum number of bills to dispense given a withdrawal amount. The possible bills dispensed include: sss and s The number of each bill to dispense should be stored indirectly through the pointers: hundredsptr fiftiesptr twentiesptr and tensptr If the withdrawalamount exceeds the balance, then the number of each bill to dispense should be set to and should be returned. If the withdrawalamount is less than or equal to the balance, then the number of each bill to dispense should be calculated, and should be returned. The function header has been provided for you.
precondition: withdrawal amount must be a multiple of
return: if the balance withdrawalamount; otherwise
int dispensebillsdouble balance, double withdrawalamount,
int hundredsptr int fiftiesptr int twentiesptr
int tensptr
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
