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++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter6: Modularity Using Functions
Section6.3: Returning Multiple Value
Problem 5E
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++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
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