Here's the question you clicked on:
subu53
How to use modulus in C program Anyone to help me figure how out how to write a code to calculate number of coins i.e quarters, dimes, pennies.
What approach do you have in mind?
ask for user input // calculate the number of quarters(25 cents) // on the remainder calculate the number of dimes(10 cents) //on the remainder calculate the number of pennies // calculate the total number of coins used.
remainder = input % quarter; quarters = input / quarter;