Question: Construct a C program, change.c which computes the minimum number of bills and coins needed to make change for a particular purchase. The cost of

Construct a C program, change.c which computes the minimum number of bills and coins needed to make change for a particular purchase. The cost of the item is $21.17 and the amount tendered is $100.00. These values should be built into the program using assignment statements rather than input into the program during program runtime. Your program should indicate how many bills and coins of each denomination are needed for the change. You should make use of the following denominations:

Bills: twenty, ten, five, one

Coins: quarter, dime, nickel, penny

Your program should make use of integer division as well as the modulas operator( %). Do not use subtraction in place of the modulus operator! Note that it will be easier to convert costs and amount tendered into pennies so you can work with integers rather than doubles.

Use the following guidelines to develop your program:

//preprocessor directives

main

//declare variables

//assign values

//perform calculations

//generate output

Make sure you are creating a C program and not a C++ program.

Output should go to both the console (monitor) as well as sent to a file named csis.txt output file.

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!