Programming

posted by .

Design a program in pseudocode that calculates the amount of money a person would earn over a period of time if their salary is one penny the first day, and then doubles each day. The program should ask the user for the number of days. Display what the salary was for each day, and then show the total pay for the end of the period. The output should be displayed in dollar amount, not number of pennies.

I have the code but i do not know if it works PLEASE HELP!!!!!:

Declare Integer days, counter = 1
Declare Real penny = 1, salary, total + 0

Display "Enter a number of days."
Input days
Display "Days",TAB,"Salary"

While counter<= days

Set salary = penny/100

Display counter, TAB, salary

Set penny = penny * 2
Set counter = counter + 1
Set total = total + salary
End While

Display "The total of your payment is$," total

  • Programming -

    It looks like it should work.

  • Programming -

    well i need help with the desk check as well to test it

Respond to this Question

First Name
School Subject
Your Answer

Similar Questions

  1. Computer Programming

    I must write a program using Java 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 …
  2. CIS Design and Programming

    Design a program that calculates the total amount of a meal purchased at a restaurant. The program should ask the user to enter the charge for the food, and then calculate the amount of a 15 percent tip and a 7 percent sales tax. Display …
  3. programming

    I have been stuck on this problem in my software design class and I hate going in these places and looking stupid but my professor had a family emergency and my homework is due tomorrow night. Design a program in pseudocode that calculates …
  4. Programming

    Design a program in pseudocode that calculates the amount of money a person would earn over a period of time if their salary is one penny the first day, and then doubles each day. The program should ask the user for the number of days. …
  5. Programming

    Design a program in pseudocode that calculates the amount of money a person would earn over a period of time if their salary is one penny the first day, and then doubles each day. The program should ask the user for the number of days. …
  6. Programming logic and design

    Using python write a program that does the following: •Create the logic for a program that calculates and displays the amount of money you would have if you invested $3000 at 2.65 percent interest for one year. •Create a separate …
  7. Computer Science

    Create a Raptor Flowchart that calculates the amount a person would earn over a period of time if his or her salary were five cents the first day, ten cents the second day, and so on doubling each day. Your program should: 1. Request …
  8. computer programming

    Create a Raptor Flowchart that calculates the amount a person would earn over a period of time if his or her salary were five cents the first day, ten cents the second day, and so on doubling each day. Your program should: 1. Request …
  9. Math

    Create a Raptor Flowchart that calculates the amount a person would earn over a period of time if his or her salary were five cents the first day, ten cents the second day, and so on doubling each day. Your program should: 1. Request …
  10. math

    calculate the amount a person would earn over a period of time if his or her salary were a penny the first day, two cents the second day, and so on doubling each day. Day Pay =============== 1 0.01000 2 0.02000 3 0.04000 4 0.08000 …

More Similar Questions