Answered step by step
Verified Expert Solution
Question
1 Approved Answer
change Change Lab umber of bills The cost of the item ould be built into an input into the program and coins Construct a C
change
Change Lab umber of bills The cost of the item ould be built into an input into the program and coins Construct a C program, change.c, which computes the minimum number of and coins needed to make change for a particular purchase. The cost of the is $21.17 and the amount tendered is $100.00. These values should be built your program using assignment statements rather than input into the pro during program runtime. Your program should indicate how many bills and 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 modulus operator (%). Do not use subtraction in place of the modulus operator! Note that it will be easier to convert the cost and amount tendered into pennies so you can work with integers rather than doubles. Use the following guidelines to develop your program: Declare your variables with appropriate data types. Assign values to your variables. Perform your calculations. Generate appropriate output. Points to Remember: Make sure you are creating a C program and not a C++ program. The .c suffix to your source code will invoke the C compiler while the .cpp suffix will invoke the C++ compiler. As this is a class in C and not C++, please make sure your source code uses the .c suffix. You should not be using any global variables in your program. A global vanade is a variable declared outside of main(). Focus on Fundamentals of Programming with C Page 107 Output from you as well as the requeste Capturing Program Output. You from your program should be sent to the terminal window (your screen) il as the requested csis.txt output file. Be sure to read the document on ring Program Output. Your full name must appear as a comment in the ce file that contains main(). Be sure to include the csis.txt output file in your zip archive. Page 108 ocus on Fundamentals of Programming w of Programming with CStep 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