Program 1: Write a function named totamt() that uses four parameters named quarters, dimes, nickels, and pennies, which represent the number of each of these coins in a piggybank.
The function should find the dollar value of the number of quarters, dimes, nickels, and pennies passed to it and return the calculated value.
Program 2: Include the function written in Exercise 7a in a working program. Be sure your function is called from main() and returns a value to main() correctly. Have main() use a cout statement to display the returned value. Test the function by passing various data to it and verifying the returned value.
You need to implement this in C++ language. You need to provide the answer as soon as possible.