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 06:10
The head restraint should be adjusted so that it reaches a.the top of your ears b.the base of your skull c.the top of the head
Answers: 1
question
Computers and Technology, 23.06.2019 06:30
On early television stations, what typically filled the screen from around 11pm until 6am? test dummies test patterns tests testing colors
Answers: 1
question
Computers and Technology, 23.06.2019 11:00
Describe three characteristics of at-risk drivers. a. b. c. describe three characteristics of safe drivers. a. b. c. describe three driver errors that could cause a collision. a. b. c. how will this information affect you as a driver now and in the future? (2-3 sentences)
Answers: 2
question
Computers and Technology, 24.06.2019 03:00
Will do anything for brainlest so can you guys me out i will try my best to you out
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
English, 29.07.2020 18:01
Questions on the website: 13722362