{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Simple Array Process

Simple Array Process - If Salaries[x> Mean Then Set Count...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Declare Employee Names[100], Salaries[100]  Set x=1  Set Sum=0  Set Mean =0  Display "Enter the number of Employees"  input Employees Count  FOR x = 1 to Employees Count DO             Display "Enter the Employee Name and salary"       input Name, salary       Set Employee Names[x]=Name       Set Salaries[x]=salary       Set Sum=Sum + salary  END FOR  Set Mean=Sum/Employees Count  Set Count Above =0  Set Count Below=0  FOR x = 1 to Employees Count DO 
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: If Salaries[x] > Mean Then Set Count Above = Count Above + 1 End If If Salaries[x] < Mean Then Set Count Below = Count Below + 1 End If END FOR Display "The Average Salary is: $"+Mean Display "The number of Salaries Above the Average Salary is:"+CntAbove Display "The number of Salaries Below the Average Salary is:"+CntBelow...
View Full Document

{[ snackBarMessage ]}