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

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!