Question: Write a Java program that creates an array of ten user-inputted money amounts (in number of dollars as decimal numbers with two decimal places, e.g.,
Write a Java program that creates an array of ten user-inputted money amounts (in number of dollars as decimal numbers with two decimal places, e.g., 44.45, 150.00, etc.). After get user inputs and create that array, read the dollar amount in that array, and then calculates and displays the conversion of each dollar amount into currency denominations $20, $10, $5, $1, and also include number of cents if there is any.
a) The program will prompt user to enter money amounts. For example, 44.45. User will enter ten numbers of dollar amounts, and program will store them into an array.
b) Convert each number of dollars from that array into the number of 20s, the number of 10s, the number of 5s, the number of 1s, and the number of cents.
c) Apply integer division and reminder to convert dollars.
d) Display the results to console.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
