/* File: countchange.c Name: This program uses a function that counts the worth (in cents) of a given number of quarters, dimes, nickels and pennies. */ #include /* The function prototype is written for you. This prototype says that countchange() has four int parameters and returns an int. */ int countchange(int , int , int , int ) ; /* Don't change the main() function! */ int main () { int cents ; int quarters, dimes, nickels, pennies ; printf("This program will compute the worth of your change.\n\n") ; printf("Enter number of quarters you have: ") ; scanf("%d", &quarters) ; printf("Enter number of dimes you have: ") ; scanf("%d", &dimes) ; printf("Enter number of nickels you have: ") ; scanf("%d", &nickels) ; printf("Enter number of pennies you have: ") ; scanf("%d", &pennies) ; cents = countchange(quarters, dimes, nickels, pennies) ; printf("Your %d quarters, %d dimes, %d nickels and %d pennies", quarters, dimes, nickels, pennies) ; printf(" are wort %d cents.\n", cents) ; return 0 ; } /* end of main() function */ /* Function countchange Computes the worth of the given number of quarters, dimes, nickels and pennies. */ /* Implement your function here */