Write a C function named change() that accepts a floating point number and the addresses of the integer variables named quarters, dimes, nickels, and pennies. The function should determine the number of quarters, dimes, nickels, and pennies in the number passed to it and write these values directly into respective variables declared in its calling function.© BrainMass Inc. brainmass.com March 4, 2021, 5:43 pm ad1c9bdddf
You will have to make this code compile and run, but all the basic ideas are here and explained below.
<br> float amountNeedingChange, //this is the input dollars to be changed
<br> int *pNQuarters, // pointer to output number of quarters
<br> int *pNDimes, // pointer to output number of dimes
<br> int *pNNickels, //pointer to output number of nickels
<br> int *pNPennies //point to output number of pennies
<br> int remainder; //this is the amount left over ...
C+ programming functions program is modeled.