subject

Write a program that tells what coins to give out for any amount of change from 1 cent to 99 cents. For example, if the amount is 86 cents, the output would be something like the following: 86 cents can be given as 3 quarters 1 dime and 1 penny

Use coin denominations of 25 cents (quarters), 10 cents (dimes), and 1 cent (pennies). Do not use nickel and half dollar coins. Your program will use the following function (among others):
void computeCoin(int coinValue, int& number, int& amountLeft);

For example, suppose the value of the variable amountleft is 86. Then, after the following call, the value of number will be 3 and the value of amountLeft will be 11 (because if oyu take three quarters from 86cents, that leaves 11 cents):
computecoins (25, number, amountLeft);

Include a loop that lets the user repeat this computation for new input values until the suer says he or she wants to end the program (Hint: use integer division and the % operator to implement this function.)

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 01:30
How do you set up a slide show to play continuously, advancing through all the slides without requiring your interaction? a. click set up slide show, and then select the loop continuously until ‘esc' and show without narration options. b. click set up slide show, and then select the loop continuously until ‘esc' and use timings, if present options. c. click set up slide show, and then select the show presenter view and use timings, if present options. d. click set up slide show, and then select the show without animation and browsed at a kiosk (full screen) options.
Answers: 3
question
Computers and Technology, 23.06.2019 02:00
For a typical middle-income family, what is the estimated cost of raising a child to the age of 18? $145,500 $245,340 $304,340 $455,500
Answers: 1
question
Computers and Technology, 23.06.2019 06:20
Which text function capitalizes the first letter in a string of text? question 10 options: upper capital first proper
Answers: 1
question
Computers and Technology, 24.06.2019 03:00
Click the "draw structure" button to activate the drawing utility. draw two diastereomers of (1z,4r)−1,4−dimethylcyclodecene and name them, including (e)/(z) and (r)/(s) notation. part 1 out of 4 draw the diastereomer containing a chiral center with s configuration here. window open
Answers: 1
You know the right answer?
Write a program that tells what coins to give out for any amount of change from 1 cent to 99 cents....
Questions
question
Mathematics, 30.10.2019 04:31
question
Mathematics, 30.10.2019 04:31
Questions on the website: 13722360