Question: Write a program named, coins.cpp . After displaying a brief description of what this program will do, the program will prompt and get from the

Write a program named, coins.cpp. After displaying a brief description of what this program will do, the program will prompt and get from the user an integer representing a number of cents. The program should assume that this number is greater than zero, but no maximum will be assumed. The program should next determine the smallest number of coins needed to represent the number of cents input by the user. The program will ONLY use the following coins: dollars, quarters, dimes, nickels, and pennies. This program does not require and should NOT use any if-statements, nor should it use any loop statements. All that is needed are the integer division operator and the remainder operator. The textbook discusses these operators. When the numbers of coins have been determined, each is displayed along with the total number of coins needed. Your output should be formatted like the examples below, but should work properly for any valid input by the user.

Example 1:

This application will calculate the smallest number of coins needed to represent a cents value. Enter a number of cents: 79 7 coins are needed to represent 79 cents: Dollars: 0 Quarters: 3 Dimes: 0 Nickels: 0 Pennies: 4 End of Least Coins App 

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!