Question

Write a program that calculates the amount a person would earn over a 30-day period of...

Write a program that calculates the amount a person would earn over a 30-day period of time if his/her salary is one penny the first day, two pennies the second day, and continues to double each day. The program should display a table showing the salary for each day, and then show the total pay at the end of the period. The output should be displayed in a dollar amount, not the number of pennies.

A sample output might look like this:

Day 1: $.01
Day 2: .02
Day 3: .04
.... etc.

Day 30: $xxx,xxx.xx

Total Salary for All 30 Days: $xxx,xxx.xx

0 0
Add a comment Improve this question Transcribed image text
Request Professional Answer

Request Answer!

We need at least 10 more requests to produce the answer.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the answer will be notified once they are available.
Know the answer?
Add Answer to:
Write a program that calculates the amount a person would earn over a 30-day period of...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Similar Homework Help Questions
  • Write a program using Python that calculates the amount of money a person would earn over...

    Write a program using Python that calculates the amount of money a person would earn over a period of time if his or her salary is one penny the first day, two pennies the second day, and continues to double each day. The program should ask the user for the number of days. Display a table showing what the salary was for each day, then show the total pay at the end of the period. The output should be displayed...

  • In Java. Use the concept of LOOPS: 2.Write a program that calculates the amount a person...

    In Java. Use the concept of LOOPS: 2.Write a program that calculates the amount a person would earn over a period of time if his or her salary is one penny the first day, two pennies the second day, and continues to double each day. The program should display a table showing the salary for each day, and then show the total pay at the end of the period. The output should be displayed in a dollar amount, not the...

  • HTML only Design and implement a program that calculates the amount of money a person would...

    HTML only Design and implement a program that calculates the amount of money a person would earn over a period of time if his or her salary is one penny the first day, two pennies the second day, and continues to double each day. The program should:ask the user for the number of daysdisplay a table showing what the salary was for each daythen show the total pay at the end of the period.The output should be displayed in the...

  • Week 5 Project Write a program that calculates the amount of money a person would earn...

    Week 5 Project Write a program that calculates the amount of money a person would earn over a period of time if his or her salary is one penny the first day, two pennies the second day, four pennies the third day, and continues to double each day. Output the amount earned each day .. and the total pay at the end. The Algorithm (Plan) for your program would be: Ask the user for the number of days to be...

  • In Python. Write a program that will calculate the amount of money a person would earn...

    In Python. Write a program that will calculate the amount of money a person would earn over a period of time if his/her salary is one penny the first day and two pennies for the second day, and continue to double each day. Hints: Declare variables Get the number of days from the user. Show the salary table for each day 4. Use ‘for loop’ to loop through the range of days (1, num_days +1) 5. Display the total pay...

  • Write a Java program that calculates how much a person would earn after a period of...

    Write a Java program that calculates how much a person would earn after a period of time, according to the following rules: 1. The starting salary for the first day is $1. 2. The salary will double each day. Ask the user to input the number of days worked. The output should display how much the salary was for each day worked, and show the total pay at the end of the work period. Get output similar to the sample...

  • Show Me The Money. (15 points) Write a C++ program that calculates how much a person...

    Show Me The Money. (15 points) Write a C++ program that calculates how much a person earns in a month if the salary 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 program should ask the user for the number of days the employee worked during the month and should display a table showing how much the salary was...

  • <!DOCTYPE html> <html> <body> <script> // // Write a function that calculates the amount of money...

    <!DOCTYPE html> <html> <body> <script> // // Write a function that calculates the amount of money a person would earn over // a period of years if his or her salary is one penny the first day, two pennies // the second day, and continues to double each day. The program should ask the // user for the number of years and call the function which will return the total // money earned in dollars and cents, not pennies. Assume...

  • Write a Java Program(DoublePenny.java) that calculates the amount after a penny has been doubled every day...

    Write a Java Program(DoublePenny.java) that calculates the amount after a penny has been doubled every day for a 30-day month. Use a while loop to carry out the calculation. Display the amount. Sample output below if the statement was something like System.out.println(“After day “ + day + “ you have “ + money); After day 2 you have 0.02 After day 3 you have 0.04 After day 4 you have 0.08 …………… After day 30 you have 5368709.12

  • Your instructor would like you to write a program in Java which would ask for the clerk to enter ...

    Your instructor would like you to write a program in Java which would ask for the clerk to enter the total amount of the customer’s order. The program will then calculate a seven percent (7%) sales tax. Commission is computed based on the following: order amount id="mce_marker" - $200 commission is 2%, order amount $201 - $400 commission is 3%, order amount $401 - $600 commission is 4%, order amount > $600 commission is 5%, The program will display the...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT