computer science
posted by Mark on .
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

I will show a brief pseudocode for you to expand on. You can post the improved version for discussions.
// data input
total < 0
while(more employees)
{
input employee.name, employee.salary
total < total+employee.salary
increment count
}
if count equals zero, quit
// calculate mean
mean < total/count
// calculate above and below mean
highCount < 0
equalCount <0
lowCount < 0
while(more employees)
{
compare employee.salary with mean and increment highCount, equalCount or lowCount according to the case
}
// Output
Print highCount, equalCount and lowCount.