Total = input
quarters = total / 25
total = total %25 (gives the remainder after removing quarters.)
repeat with dimes (10), nickels(5), and pennies = remainder.
int change=94;// in cents
int q,d,n,p;
q=change/25;
change=change%25;
d=change/10;
change=change%10;
n=change/5;
change=change%5;
p=change;
If anyone could write out the steps for this problem how you would write it on C++ that would be greatly appreciated, thanks.
Write a program that displays the coins necessary to make the change entered by the user. The change can be made up of quarters, dimes, nickels, and pennies. Assume that the amount of change is less than $1.00.
Here is a sample output:
Enter the amount of change in cents: 68
Change: Quarters: 2
Dimes: 1
Nickels: 1
Pennies: 3
I'll be happy to answer any questions if there are misunderstandings.