Question: JAVA public static void pennies(int days) This method calculates how much a person earns for the number of days specified in the parameter. Earned money
JAVA public static void pennies(int days) This method calculates how much a person earns for the number of days specified in the parameter. Earned money is one penny the first day, two pennies the second day, four pennies the third day, and so on with the daily pay doubling each day the employee works. The method should display a table showing how much money was earned for each day worked, as well as the total amount earned. The output should be displayed in dollars with two decimal places, not in pennies. If the number of days is 4: day $ 1 0.01 2 0.02 3 0.04 4 0.08 ----- 0.15
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
