Question: Coin Counting Problem. Solve using matlab please. Write a script using iteration to answer the following question: What is the average number of coins you

Coin Counting Problem. Solve using matlab please.
Write a script using iteration to answer the following question: What is the average number of coins you
can expect to receive in your change after a cash transaction?
To solve this problem, your script must calculate the number of coins required to form all 100 cent
amounts in the range 00,01,02,dots,98,99 and then compute the average. We'll assume that all
quantities of change are equally likely and that the denominations available are:
Quarter =25 cents
Dime =10 cents
Nickel =5 cents
Penny =1 cent
Additionally, we'll assume that all the individual amounts are formed using the minimum number of
coins. I.e.58 cents require 2 quarters, 1 nickel, and 3 pennies for a total of 6 coins.
Your script should report the average number of coins using the exact formatting shown below:
Average Number of Coins =0.00
where 0.00 will be replaced with your answer formatted using '??%.2f'
Coin Counting Problem. Solve using matlab please.

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 Programming Questions!