# Computer Programming

posted by .

I was wondering if someone could review my pseudocode to see if I got this right.

Here is the question: Input a list of employee names and salaries, and dtermine the mean (average) salary as well as the number of salaries above and below the mean.

Here is my pseudocode:
Declare Names[20] Of Strings
Declare Salary[20, 2] Of Integers
Declare Count, Salary, K, J As Integer
Declare EmployeeName As String
Declare Sum, Average As Real
Set Count = 0
Write “Enter an employee’s name; enter * when done.”
Input EmployeeName
While EmployeeName <> “*”
Set Count = Count + 1
Set Name[Count] = EmployeeName
Write “Enter salary for ” , Names[Count]
For Test = 1 Step 1 To 2
Input Salary[Count, Test]
End For
Write “Enter an employee’s name; enter * when done.”
Input EmployeeName
End While
While the array A is not sorted
For K = 1 Step 1 To N – 1
If A[K] > A[K + 1]
Interchange A[K] and A[K + 1]
End If
End For
End While
For K = 1 Step 1 To Count
Set Sum = 0
For J = 1 Step 1 To 2
Set Sum = Sum + Salary[K,J]
End For J
Set Average = Sum / 2
Write Names[K], Average
End For (K)

• Computer Programming -

here is the rest of the psuedocode:
Set Count = Count + 1
Set Name[Count] = EmployeeName
Write “Enter salary for ” , Names[Count]
For Test = 1 Step 1 To 2
Input Salary[Count, Test]
End For
Write “Enter an employee’s name; enter * when done.”
Input EmployeeName
End While
While the array A is not sorted
For K = 1 Step 1 To N – 1
If A[K] > A[K + 1]
Interchange A[K] and A[K + 1]
End If
End For
End While
For K = 1 Step 1 To Count
Set Sum = 0
For J = 1 Step 1 To 2
Set Sum = Sum + Salary[K,J]
End For J
Set Average = Sum / 2
Write Names[K], Average
End For (K)

• Computer Programming -

ah forget it, if I can't copy and paste its not worth it.

## Similar Questions

1. ### computer science

Pseudo code: Input a list of employee names and salaries, and determine the mean (average) salary as well as the number of salaries above and below the mean
2. ### programming

John: 50,000 Joe: 30,000 Jane: 60,000 Jill: 25,000 Total: 165,000 Declare employees [4] Of Reals Declare Sum, Average As Real Declare salaries As Integer Set Sum = 0 For salaries = 1 Step 1 To 4 Write “Average salaries ”, salaries …
3. ### computer science

I need to see if someone can help me with a c# programming problem Create a class called employees that includes three pieces of information as either instance variables or automatic properties - a first name(type string), a last name …
4. ### computer programming

Input a list of positive numbers (terminated by 0) into an array, find the mean (average) of the numbers in the array, and output the result. Use a subprogram to input the numbers, a function to find the mean, and a subprogram to output …
5. ### QBASIC, Computers

The following is a list of salaries of the six employees in a certain company: Name Salary T. Angel \$43,000 F. Smith \$31,000 K. Johnston \$22,000 P. Miner \$18,000 C. Altman \$27,000 A. Lu \$19,000 Read a single dimension array for name …
6. ### programming

write a program that creates a list of employees objects of size n entered from user using list interface and a list class implementation and display all employees in list and print employee name with minimum salary and remove employee …
7. ### programming concepts

Input a list of employee names and salaries stored in parallel arrays. The sal-aries should be floating point numbers in increments of 100. For example, a salary of \$ 36,000 should be input as 36.0 and a salary of \$ 85,900 should be …
8. ### computer programming

Write a C++ pogram for the following Employee Name and 12 months’ salary. Salary starts with \$5000 per month and increments every month by 10% of previous month salary. At the end of the year, the employee is paid a 5% bonus on top …
9. ### visual basic programming

Write a program that accepts salaries of 25 employees into an array into an array and display the following i. Sum of all salaries ii. All salaries below 500 iii. All salaries above 3200 iv. Average salary v. Message if the salary …
10. ### Programming

Develop a Java application that will determine the gross pay for each of three employees. The company pays “straight line” for the first 40 hours worked by each employee and pays “time and a half” for all hours worked in excess …

More Similar Questions