Enter amount of cents: 119 (assuming this is what the user types in)
Pennies: 4
Nickels: 1
Dimes: 1
Quarters: 4
And this is to assume each have their own obvious values, (example quarters = 25 cents, nickels 5 cents, dimes 10 cents etc.)
However, I am unsure of what exactly I'm supposed to do. My coding as of now is awfully sloppy and I'm told I require the modules operator. I know modules is the remainder of the two numbers after dividing, but I am confused on how it works in my current code.
Could someone give me useful tips or hints on my code?
I am hoping my mode of thinking is right. When you use the modulus operator, it leaves the remainder. What you are wanting to do is to divide the total amount given by 25 to get the amount of quarters. If you modulus that same amount, it will give you the total to do the dimes on.