How many ways can one make a single US dollar from exactly 10 coins? Write a program that calculates the answer to this. For bonus points, write one that can calculate the answer for any amount of money and any amount of coins.
50 cent pieces, quarters, dimes, nickels, and pennies are allowed.
The answer to the problem is 6. ENTERPRISE C SOLUTION in the next post.
/**********************************************************************
* Fuck y'all niggas, I'm not using the 80 character width standard *
* And you'd better set your tab width to 4 spaces *
**********************************************************************/
#include <stdio.h>
int debug = 0;
int money, coinmax;
int calc()
{
int valids = 0;
int halfds, quarters, dimes, nickels, pennies;