Question: Write a program to convert pennies from a penny jar into dollars, quarters, dimes, and nickels. Begin by retrieving the number of pennies from the

Write a program to convert pennies from a penny jar into dollars, quarters, dimes, and nickels. Begin by retrieving the number of pennies from the end user. If the amount of pennies entered is > 5, determine the number of $1 bills, quarters, dimes, and nickels that can be used to replace the pennies. Report the original number of pennies along with the equivalence in dollars, quarters, dimes, and nickels. An error message should be reported if a negative value is entered for the amount of pennies.

exsample runs should look like

1.how many pennies do you have 268

268 pennies can be converted to 2 dollar(s); 2 quarter(s); 1 dime(s); 1nickel(s); and 3 pennies (left over)

can you write this out in java?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!