How do I get the user to enter arbitrary combinations of coins that will be recognized as a dollar?
I am attempting to have a character ask the user to enter a number of pennies, nickels, dimes, and quarters. If the total value of the coins entered equals a dollar, the character congratulates the user. Otherwise, the character tells the user whether the amount entered was more or less than one dollar (see: Starting Out with Alice, 3/E Exercise 4).
I have created variables for the dollar and coins, one variable per each (e.g., dollar = 1, quarter = 0.25). There is an If/Else statement with the true/false actions.
My handiwork:
EDIT: If anyone can tell me how to crop the image on the forum, I will gladly do so!