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
input employee.name, employee.salary
total <- total+employee.salary
if count equals zero, quit
// calculate mean
mean <- total/count
// calculate above and below mean
highCount <- 0
lowCount <- 0
compare employee.salary with mean and increment highCount, equalCount or lowCount according to the case
Print highCount, equalCount and lowCount.