Question: Write a java program named: CoinConverter.java This program will prompt the user for a number of cents, reading in the value from the keyboard. The
Write a java program named: CoinConverter.java This program will prompt the user for a number of cents, reading in the value from the keyboard. The number entered should be an integer. Using the value entered, calculate and print the number of quarters, dimes, nickels and/or pennies needed to achieve the value entered. If no coins of a denomination are needed, print 0 that value. (ex. if only quarters and pennies are needed, print "O dimes" and "O nickels") Make sure you print only "quarter", "dime", "nickel" or "penny" when only 1 coin is required. NOTE: For Vocareum to grade your work correctly, place the user input on the new line (just use printin in your prompt). Here's an example of the program I/O (user input in italics): Enter a number of cents, and I'll tell which coins are needed to achieve that value 67 2 quarters 1 dime 1 nickel 2 pennies Enter a number of cents, and I'll tell which coins are needed to achieve that value: 40 1 quarter 1 dime 1 nickel 0 pennies
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
