Question: Write a Java program that prompts the user to enter a monetary amount (in dollars and cents) as a double precision variable and then displays
Write a Java program that prompts the user to enter a monetary amount (in dollars and cents) as a double precision variable and then displays the monetary equivalent in dollars, quarters, dimes, nickels, and pennies. For example, if the user enters 15.98 the program should display the following result: $15.98 consists of 15 dollars, 3 quarters, 2 dimes, 0 nickels, 3 pennies.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
