Hello
This my first programming class and I noticed that someone posted the following Simply Array Process Pseudocode which is in regard to:
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.
My question is what [100] in the first line of the Pseudocode stands for? please I need help

Declare Names[100], Salaries[100]
Set Sum = 0
Set Count1 = 0
Set K = 1
Write “Enter Employees Name and Salary.”
Write “Enter *,0 when done.”
Input Name, Salary
While Salary <> “0”
    Set Count1 = Count1 + 1
    Set Sum = Sum + Salary
    Write “Enter another Employee Name and Salary (enter *,0 when done)”
    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
Write “The Average Salary is: $”, Average
Write “The number of Salaries Above the Average Salary is:”, Count2
Write “The number of Salaries Below the Average Salary is:”, Count3

Recommended Answers

All 2 Replies

My question is what [100] in the first line of the Pseudocode stands for?

It's the size of an array.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.