Search for question
Question

Exercise 4) (4 Pts)

Write a program named "Exercise4.cpp", which displays the numbers of coins (1 ¢, 5¢, 10¢,

25¢) when a user inputs the total amount of cents (c) as an integer. We don't use 50¢ (half) or

100¢ (dollar coin) in this case. For example, when the input is 87, the program displays below.

Each line has 12 spaces. Make sure that your program MUST display 12 *** (asterisk) symbols

in the after-input and last lines, and 12 *-* (minus) symbols before the Total line. Otherwise. 0

point is given.

Type one integer here.

89

Quarter:

Dime:

Nickel:

Penny:

Total

3

لا لا

1

0

4

8

Of course, there are many other combinations. You are asked to calculate the result so that the total

number of coins is minimum. In the above case, 8 (3+1+4) is the minimum. 89 pennies is not

accepted because total coin number is 89 in this case.

Fig: 1