I am writing a program that allows the user to input a dollar amount and in return gives them the amount of pennies, nickels, dimes, and quarters in that dollar amount. I am using the following code to set the constant value of each nickels, dimes, and quarters.
I would prefer to replace the value of nickels, dimes, and quarters with a decimal value so that I didn't have to multiply by 100 and then divide. However, when I try that the program crashes when it tries to calculate these values.
Is this possible to do or do I have to go another route?