Question: In JAVA (JAVA) Exercise #3: Design and implement a program (name it Coins) that determines the values of coins in a jar. The program prints
In JAVA (JAVA) Exercise #3: Design and implement a program (name it Coins) that determines the values of coins in a jar. The program prints out the total dollars and cents in the jar. The program prompts the user to enter the number of coins (quarters, dimes, nickels, and pennies). Print out the number of coins entered for each coin type on separate lines followed by the total amount of money in the jar as dollars and cents as shown below. Sample run 1: Enter number of quarters: 2 Enter number of dimes: 2 Enter number of nickels: 2 Enter number of pennies: 2 You entered 2 quarters You entered 2 dimes You entered 2 nickels You entered 2 pennies Your total is 0 Dollars and 82 Cents. Sample run 2: Enter number of quarters: 3 Enter number of dimes: 0 Enter number of nickels: 0 Enter number of pennies: 3 You entered 3 quarters You entered 0 dimes You entered 0 nickels You entered 3 pennies Your total is 0 Dollars and 78 Cents. Sample run 3: Enter number of quarters: 2 Enter number of dimes: 3 Enter number of nickels: 4 Enter number of pennies: 5 You entered 2 quarters You entered 3 dimes You entered 4 nickels You entered 5 pennies Your total is 1 Dollars and 5 Cents.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
