Question 1) Write a user defined function called Change. The user enters the amount paid and the amount due in the main function. The program determines how many dollars, quarters, dimes, nickels, and pennies should be given as change. The function parameter has two double pointer reference parameters. The first parameter represents the amount paid and the second represents the amount due. Assume the user will always pay over the amount due. Pointers are required to receive full credit for the problem. If pointers aren't used, then no credit will be given. Sample output for question 1: Amount Due: 10.42 Amount Paid: 15.00 |Change 4 dollars 2 quarters e dimes 1 nickels 3 pennies

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter6: User-defined Functions
Section: Chapter Questions
Problem 19PE
icon
Related questions
Question

**C PROGRAMMING LANGUAGE 

**PLEASE PUT SOME COMMENTS

** DOUBLE CHECK IF IT WORKS

Q IN PICTURE

Question 1) Write a user defined function called Change. The user enters the amount paid and
the amount due in the main function. The program determines how many dollars, quarters,
dimes, nickels, and pennies should be given as change. The function parameter has two double
pointer reference parameters. The first parameter represents the amount paid and the second
represents the amount due. Assume the user will always pay over the amount due. Pointers are
required to receive full credit for the problem. If pointers aren't used, then no credit will be
given.
Sample output for question 1:
Amount Due: 10.42
Amount Paid: 15.00
Change
4 dollars
2 quarters
e dimes
1 nickels
3 pennies
Transcribed Image Text:Question 1) Write a user defined function called Change. The user enters the amount paid and the amount due in the main function. The program determines how many dollars, quarters, dimes, nickels, and pennies should be given as change. The function parameter has two double pointer reference parameters. The first parameter represents the amount paid and the second represents the amount due. Assume the user will always pay over the amount due. Pointers are required to receive full credit for the problem. If pointers aren't used, then no credit will be given. Sample output for question 1: Amount Due: 10.42 Amount Paid: 15.00 Change 4 dollars 2 quarters e dimes 1 nickels 3 pennies
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning