Question: Complete the monetary change program. Use the fewest coins (i.e., using maximum larger coins first). Please indicate your changes in bold . #include using namespace

Complete the monetary change program. Use the fewest coins (i.e., using maximum larger coins first). Please indicate your changes in bold.

#include using namespace std;

// FIXME: Add parameters for dimes, nickels, and pennies. void ComputeChange(int totCents, int& numQuarters ) {

cout << "FIXME: Finish writing ComputeChange" << endl;

numQuarters = totCents / 25;

return; }

int main() { int userCents = 0; int numQuarters = 0; // FIXME add variables for dimes, nickels, pennies

cout << "Enter total cents: " << endl; cin >> userCents;

cout << "FIXME: Finish writing main()" << endl;

ComputeChange(userCents, numQuarters);

cout << "Quarters: " << numQuarters << endl;

return 0; }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!