|
-
November 6th, 2001, 09:00 PM
#1
Programming Logic Help
Ok this is a problem for my Programming Logic class that I need help with
The members of the board of a small university are considering voting for a pay increase for their
25 faculty members. They are considring a pay increase of 8%. How ever before doing so, they want to know how much this pay increase will cost Design an algorithm that will prompt for and accept the current salary for each of the faculty members, then calculate and display their individual pay increases. At the end of the algorithm, print the total faculty payroll before and after the pay increase, and the total pay increase involved.
Better Version.
Inputs
member_salary
Processing
calculate member_new_salary (member_salary + 8%) or (member_salary * 1.08)
calculate member_pay_increase (member_new_salary – member_salary)
calculate total_current_salaries (sum of all member_salary)
calculate total_new_salaries (sum of all member_new_salary)
Outputs
display member_pay_increase
display total_current_salaries
display total_new_salaries
display total_pay_increases (total_new_salaries - total_current_salaries)
Pseudocode
Prompt for member_ original_salary
Get Salary
DoWhile salary = 25
Display "Members Original Salary"; member_original_salary
EndDo
Calculate total_current_salary
Get Salary
DoWhile salary = 25
Calculate total_current_salary = member_original_salary + 25 member_salary
Display "Total of Current Salaries"; total_current_salary
EndDo
Calculate member_new_salary
Prompt for original salary
Get Salary
DoWhile salary = 25
Calculate member_new_salary = member_salary * 8%
Display "New Salary"; member_new_salary
EndDo
Calculate member_pay_increase
Prompt for member_salary
Get Salary
DoWhile salary = 25
calculate member_pay_increase = member_new_salary - member_salary
Display "Pay Increase"; member_pay_increase
EndDo
Calculate total_current_salaries
Prompt for member_salary
Get Salary
calculate total_current_salaries = total_current_ salaries + 25 member_salary
Display "Total Current Salaries"; = total_current_salaries
end
Calculate total_new_salaries
Prompt for member_salary
Get Salary
Calculate total_new_salaries = total_current_salaries + member_pay_increase
Display "Total of new Salaries"; = total_new_salaries
end
I just need to know if it looks right, It also might help to look at it in word pad. But I need to know if my Pseudocode look right.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|