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, 22.06.2019 19:00
How is the number 110 written when expanded out to place values in the base 2 (binary) number system? options: 2 x 4 + 3 x 2 + 4 x 1 1 x 2 + 1 x 2 + 0 x 2 1 x 100 + 1 x 10 + 0 x 1 1 x 4 + 1 x 2 + 0 x 1
Answers: 1
question
Computers and Technology, 22.06.2019 22:00
Discuss the ways in which electronic information associated with payments is addressed in terms of security. include encryption, secure sockets layers, and secure electronic transactions in your discussion. are there any other ways that consumers and businesses can keep their payment information secure in an electronic commerce environment? do you feel that your information is safe when conducting electronic business? why or why not?
Answers: 1
question
Computers and Technology, 24.06.2019 18:30
Jacking is a crime that takes place when a hacker misdirects url to a different site. the link itself looks safe, but the user is directed to an unsafe page
Answers: 1
question
Computers and Technology, 24.06.2019 21:50
The use of phrases, fragments, and punctuation can influence the mood of a passage; keeping this in mind, how would you describe the mood of the followingpassage? "fog on the essex marshes, fog on the kentish heights, fog creeping into the cabooses of collier-brigs; fog lying out on the yards, and hovering in the riggingof great ships; fog drooping on the gunwales of barges and small boats. fog in the eyes and throats of ancient greenwich pensioners, wheezing by thefiresides of their wards; fog in the stem and bowl of the afternoon pipe of the wrathful skipper; fog cruelly pinching the toes and fingers of his shivering little'prentice boy on deck." (5 points)
Answers: 2
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, 23.11.2019 16:31
question
Biology, 23.11.2019 16:31
question
Mathematics, 23.11.2019 16:31
Questions on the website: 13722363