#include <stdio.h>
#define COIN_TYPES 4
void findMinCoins(int coins[], int amount) {
int coinList[COIN_TYPES] = {0};
for(int i = 0; i < COIN_TYPES && amount > 0; i++) {
if(coins[i] <= amount) {
coinList[i] = amount / coins[i];
amount = amount - coinList[i] * coins[i];
}
}
printf("The minimum number of coins is: \n");
for(int i = 0; i < COIN_TYPES; i++) {
if(coinList[i] != 0) {
printf("%d coin(s) of %d\n", coinList[i], coins[i]);
}
}
}
int main() {
int coins[COIN_TYPES] = {25, 10, 5, 1};
int amount = 63;
findMinCoins(coins, amount);
return 0;
}