Question: Develop and memory trace an algorithm that converts an arbitrary number of pennies to a min- imum number of coins using quarters, dimes, nickels, and

Develop and memory trace an algorithm that converts an arbitrary number of pennies to a min- imum number of coins using quarters, dimes, nickels, and pennies. The input to your algorithm is to be the original number of pennies N, The outputs are to be the resulting number of quarters Nq, the number of dimes Nd, the number of nickels Nn, the number of pennies Np, and the total number of coins Ntot. Use 72 pennies and 35 pennies to memory trace your algorithm separately. Only basic math operations and algorithm statements can appear in your algorithm; no Matlab built-in functions are allowed.

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!