Question
Assignment: You are to write a program in C that will take as input an amount in dollars and produce as output the number of
Assignment: You are to write a program in C that will take as input an amount in dollars and produce as output the number of bills and coins that make up that amount. For bills use $100, $50, $20, $10, $5, and $1. For coins use quarters, nickels, dimes, and pennies. Use a while loop so that input can continue until a negative number is entered at which point the program will end. The program should prompt the user for the amount in dollars and cents, and tell the user that entering a negative number will cause the program to terminate. The input prompts and output statements MUST match the sample execution below.
Sample Execution: Please enter an amount in dollars(enter a negative number to quit):
145.56 145.56 dollars consists of the following bills and coins:
The number of hundred dollar bills is 1
The number of fifty dollar bills is 0
The number of twenty dollar bills is 2
The number of ten dollar bills is 0
The number of five dollar bills is 1
The number of one dollar bills is 0
The number of quarters is 2
The number of dimes is 0
The number of nickels is 1
The number of pennies is 1
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started