Post a New Question

computer science

posted by .

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

  • computer science -

    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.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.

Answer This Question

First Name
School Subject
Your Answer

Related Questions

More Related Questions

Post a New Question