# 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. 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.

Declare Integer days, counter = 1, penny = 1, total = 0

Declare Real salary, totalPay

Display "Enter a number of days."

Input days

Display "Days",TAB,"Salary"

While counter<= days

Set salary = penny/100

Set total = penny

Display counter, TAB, salary

Set penny = penny * 2
Set counter = counter + 1

End While
Set totalPay = total * 100

Display "The total payment of your time working here will be \$", totalPay

1. 👍
2. 👎
3. 👁
1. I am not sure abut the rest, but how you have it set up to display pennies as a dollar amount isn't going to work. For an example, if you end up with 100 pennies at the end, and you multiply that by 100, you will get 10,000, not \$1.00. It would be easier if you set penny=.01 (not sure what variable type it would be, it's been a while) and not even mess with changing it into a dollar amount. Just display totalPay as the final amount of penny. The decimal will take care of the conversion itself.

1. 👍
2. 👎
2. I see that the line that says

Set total = penny

should have the penny value dividing by 100 like the line

Set salary = penny/100

I see that error but other than that is there anything else wrong like a variable placement or variable value wrong?

1. 👍
2. 👎

## Similar Questions

1. ### Pseudocode

Write pseudocode for a program that calculates a customer’s total price after tax. The program will ask the user for the price of the item they are buying. Then the program will add a 5% tax to the item and output the final

2. ### CIS

Draw a flowchart or write pseudocode to represent the logic of a program that allows the user to enter a value. The program multiplies the value by 10 and outputs the result.

3. ### Programming

Write pseudocode to represent the logic of a program that allows the user to enter a value for hours worked in a day. The program calculates the hours worked in a five day week and the hours worked in a 252 day work year. The

4. ### C++

// Program: name of program // Author: your name // Date Written: date you began writing the program /* Abstract: Brief description of the program */ Include in-line comments in the body of your program. You can convert

1. ### Programming and Design

Draw the hierarchy chart and design the logic for a program that calculates the projected cost of an automobile trip. Assume that the user's car travels 20 miles per gallon of gas. Design a program that prompts the user for a

2. ### Math

Are these correct ?. My grade counts on this and I'm not the best at math. I. Interest is ____?. (1pt) a. The amount of money your bank pays you for the use of only your money. b. The amount you might pay for a loan. * c. A

3. ### 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

4. ### programming

create the logic for a program that calculates and displays the amount of money you would have if you invested \$5000 at 2 percent simple interest for one year. create a separate method to do the calculation and return the result

1. ### programming

write a program in C# that calculates and prints the take home pay for a commissioned sales employee. allow the user to enter values for the name of the employee and the sales amount for the week. employee receives 7% of the total

2. ### Economics

Please help me. What are the primary reasons people choose to invest and trade stocks? (Select all that apply.) to earn capital gains*** to earn predictable quarterly interest to earn a dividend*** to earn liquid money

3. ### programming logic and design

I need help writing pseudocode for this problem: Design a retirement planning calculator for skulling financial services • Allow a user enter a number of working years remaining in the user career and the annual amount of money

4. ### Health (Ms. Sue)

1. Explain how the FITT formula can act as a guide when you are developing a fitness program. A: The FITT formula can act as a guide when you are developing a fitness program as it provides you with an idea of how the structure of