Create a project called Daily18. Add the given daily18.c into the project and use it as a driver. In this exercise, you will practice writing a function that uses pointers as the function parameters. A group of elementary school kids are learning how to use coins (i.e., quarters, dimes, nickels, and pennies) to represent any amount of money. To make it simple for the kids, the total amount of money is in cents and could be any integer from 0 to 1000 (inclusive). Your job is to write a function and help them to validate the results. Please try to use the high value coins as much as possible. That is, always use quarters first, then dimes, nickels, and last pennies. After you write the function, you should call it in the driver program to test it. The printf statements should print the results directly You need to follow these constraints below: Inside the main function, you can only call the function you write. Nothing else should be added or altered. You are not allowed to use any global variables anywhere in the program.
// call the function below:
change(totalCents, &numQuarters, &numDimes, &numNickels, &numPennies) ;
defination of the function is:
void change(totalCents, &numQuarters, &numDimes, &numNickels, &numPennies)
{
if(totalCents >= 100)
{
numDollars = totalCents / 100;
totalCents = totalCents - (100 * numDollars);
}
if(totalCents >= 25)
{
numQuarters = totalCents / 25;
totalCents = totalCents - (25 * numQuarters);
}
if(totalCents >= 10)
{
numDimes = totalCents / 10;
totalCents = totalCents - (10 * numDimes);
}
if(totalCents >= 5)
{
numNickels = totalCents / 5;
totalCents = totalCents - (5 * numNickels);
}
if(totalCents>= 1)
{
numPennies = totalCents/ 1;
totalCents = totalCents- (1 * numPennies);
}
}