Tuesday
September 23, 2014

Homework Help: Programming

Posted by Ant on Friday, May 21, 2010 at 1:51pm.

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

Answer this Question

First Name:
School Subject:
Answer:

Related Questions

Programming - Design a program in pseudocode that calculates the amount of money...
programming - I have been stuck on this problem in my software design class and ...
Programming - Design a program in pseudocode that calculates the amount of money...
Computer Programming - I must write a program using Java that calculates the ...
Programming Logic and Design - This is my 3rd time posting this problem because ...
Sequential and Selection Processing Control Struct - You are an accountant ...
CIS Design and Programming - Design a program that calculates the total amount ...
programming - You have the final sales figures for the four quarters in 2010 for...
Computer Programming Design - I really need someone to help me with this.I post ...
Programming - Language - PYTHON Design a program that calculates the total ...

Search
Members