Question
***Note***: This need to be done with JAVA and it needs a psudeo code as well, please make sure the indentation is correct and standard,thank
***Note***: This need to be done with JAVA and it needs a psudeo code as well, please make sure the indentation is correct and standard,thank you!
Based on Count Controlled Loops (use FOR LOOPS)
Program : Pennies: For the first day worked a person earns $1.00 for the entire day. For the second day worked the persons daily pay is doubled to $2.00. For the third day worked the persons daily pay is doubled again to $4.00. For each consecutive day a person works their daily pay is doubled in this way.
Write a program that asks a user to enter the number of days they worked and then calculates the pay they earned for each day along with the total pay they earned for all of the days. The program output should be the pay for each day and the total pay earned for all the days.
Input Validation: Do not let the user enter a number of days that is less than 1. Use a loop to prompt them to enter another number for the number of days if they enter a number that is less than 1.
Make sure and format your output.
Example: This would be the output for a person who worked 4 days
Pay for Day 1: $1.00 Pay for Day 2: $2.00 Pay for Day 3: $4.00 Pay for Day 4: $8.00
TOTAL PAY FOR 4 DAYS: $15.00
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started