Question: Write a program that asks the user to enter a U . S . dollar ( $ ) amount and then shows them how
Write a program that asks the user to enter a US dollar $ amount and then shows them how to pay the ammount using the smallest number of $$$ and $ dollar bills. Store the user provided number as an integer. Create a variable to store the number of each bill type ie twenties, tens, fives, and ones Print the number of each bill.
You will not need to consider coins in this program.
Your program should behave as follows:
Enter a dollar amount:
$ bills:
$ bills:
$ bills:
$ bills:
Hint: Divide using integer division the given amount by to determine the number of $ bills needed, then find the remainder of integer division to determine what is left after removing the twenties.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
