int q=coins/25; //gives number of quarters
int mq=coins%25; gives modulo quarters
int md=mq/10;
int mn=md/5;
int mp=mn/1;
printf("%d, %d, %d, %d,", q+md+mn+mp);
So I've been able to prompt the user for a float and convert that float to an int*100. The trouble is with my algorithm - I'm not sure where to go from here.
This code currently prints the number of quarters, plus the modulo's for dimes, nickels, and pennies. My above code allows me to pass all of the check50 inputs above $1 - nothing below, so I imagine I've made all of my variables dependent on the quarter. I was trying to figure out an efficient way to do the same thing with the other coins, but it just seems like too many variables.
I feel like I'm on the right track but another set of eyes would be a big help right now. Any advice is welcome. Thanks so much.