Input a list of employee names and salaries, and determine the mean (average) salary as well as the minimum salary and maximum salary.
Design a program in pseudocode that solves this problem. You are required to generate only the pseudocode - No charting or analysis section is required, but you may have to incorporate the bubble sort algorithm to determine the minimum and maximum salary.
Integer variables: Sum, Count1, Count2, and K
Float variables: Score and Average
1 Declare Medieval[100] As Float
2 Set Sum = 0
3 Set Count1 = 0
4 Write "Enter a test score (or 999 to quit): "
5 Input Score
6 While Score != 999
7 Set Medieval[Count1] = Score
8 Set Count1 = Count1 + 1
9 Set Sum = Sum + Score
10 Write "Enter another score or 999 to quit: "
11 Input Score
12 End While
13 Set Average = Sum/Count1
14 Set Count2 = 0
15 Set K = 0
16 While K Average Then
18 Set Count2 = Count2 + 1
19 End If
20 Set K = K + 1
21 End While
22 Write "The average is:" + Average
23 Write "The number of scores above the average is: " + Count2
24 Write "The number of scores below the average is: " + (Count1 - Count2
My Pseudocode
Declare Names[30], Salaries[30]
Declare Sum as Float
Declare Count as Integer
Declare K as Integer
Declare Average as Float
Declare StudentName As String
Set Sum = 0
Set Count = 0
Set K = 1
Write "Enter Name; enter " when done."
Input StudentName
While StudentName != "*"
Input Name, Salary
While Salary "0"
Set Count1 = Count1 + 1
Set Sum = Sum + Salary
Write "Enter Name and Salary
Input Name, Salary
End While
Set Average = Sum / Count1
Set Count2 = 0
Set Count3 = 0
For K = 1 Step 1 to Count1
If Salary K > Average Then
Set Count2 = Count2 + 1
End If
If Salary K < Average Then
Set Count3 = Count3 + 1
End If
End For
End While
Write "Average Salary: $", Average
Write "Maximum Salary:", Count2
Write "Minimum Salary:", Count3