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 U.S. dollar (\$) amount and then shows them how to pay the ammount using the smallest number of \$20,\$10,\$5, and \$1 dollar bills. Store the user provided number as an integer. Create a variable to store the number of each bill type (i.e. 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: 93
$20 bills: 4
$10 bills: 1
$5 bills: 0
$1 bills: 3
```
*Hint: Divide (using integer division) the given amount by 20 to determine the number of $20 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 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!