
Larry C. answered 06/22/19
Experienced programmer, analyst, database designer and administrator
Not going to write the code for you, but the algorithm will be something like the following (note that / denotes integer division and % denotes modulo division):
int current, dollars, quarters, dimes, nickels, pennies
current = user input
dollars = current / 100
current = current % 100
quarters = current / 25
current = current % 25
etc.