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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started