Ana A.

asked • 08/14/22

C++ Write a code

Write a program to read a positive integer value less that 100 that represents the number of cents, and to output the change starting with the maximum number of quarters, then dimes, nickels and pennies. After you output the following prompt and then read the input value

Enter the amount in cents: 99 (from the Keyboard)


The output of your program must look like the following:


The change is as follows:

Quarters: 3

Dimes: 2

Nickels: 0

Pennies: 4


Given an integer value n less than 100, the quotient in the division of n by 25 is the maximum number of quarters in the

change. To compute the maximum number of dimes in the change, you must first compute what is left after the change in

quarter is taken away and then compute the quotient in the division of this remainder by 10. Then repeat the process for

the number of nickels and the number of pennies.


1 Expert Answer

By:

Donald W. answered • 08/16/22

Tutor
5.0 (214)

Senior Software Engineer with over 25 years of industry experience

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.