Please build this program for me so I can dissect it and study each line!
Write a C++ program to calculate the fewest number of each denomination needed to pay a bill of amount TOTAL. For example, if the end user enters $97 for TOTAL, program will output that the bills would consist of one $50 bill, two $20 bills, one $5 bill, and two $1 bills. (Assume that the amount is in whole dollars, no cents, and only $100, $50, $20, $10, $5, and $1 denominations are available.) Aid: You may want to use the modulus operator %.
If you try to write a program for this problem and post the code here, we'll give you advice about it but you need to write it first. If you post code, please use code tags (go advanced, select code, click '#')
All advice is offered in good faith only. You are ultimately responsible for effects of your programs and the integrity of the machines they run on.
Please build this program for me so I can dissect it and study each line!
Write a C++ program to calculate ...
So how much are you going to pay for such a work made for you?
And if you are read to pay then please, move your post to the correspondent Forum (like Open Positions (Jobs))
If you are not going to pay then you'll need to do your work yourself, and 2kaud already wrote how it could be done.
Please build this program for me so I can dissect it and study each line!
If you want to "study each line", then why this specific example? Why not another example? C++ is C++, regardless of what the program is supposed to do, so if you really wanted to "study each line", then you would get any C++ program and "study it". So in truth, this is really homework, isn't it?
Forget about C++ for the moment. Do you know how to calculate the fewest number of bills, regardless of whether you know C++ or not? What if someone asked you to write down the steps to get you the fewest number of bills. Can you do that? If you can, then you translate those steps into a program. If you don't know the steps to figure out the problem, then that is where you start.
Bookmarks