C program Currency Converter
I need help with a homework problem. I have no C programming experience.
Here are the instructions:
Write a C program to calculate the change converter. Take input from the user for amount due and currency note. You are required to give back the balance amount in the least denomination (i.e. least amount of currency to be returned). The program must be able to calculate in dollars, quarter, dime, nickel and pennies.
Example
Amount Due = $25.52
Amount Given = $30.00
Balance Amount = $ 4.48
Given back in denomination as
$1 bill - 4 = 4.00
Quarters - 1 = 0.25
Dimes - 2 = 0.20
Pennies - 3 = 0.03
Hint:
Use mod function (%)
Can anyone please help!
Thanks in advance
|