# MB - While Salary<>"0" Set Count1 = Count1 1...

This preview shows pages 1–2. Sign up to view the full content.

Analysis Input: Employee Name (string: EmployeeName) Mean Salaries (real: MeanSalaries) Salaries Above and below (integer: SalaryNumber) Process: Display a program title. Prompt for the Employee name. Prompt for the Salaries. Prompt for the Number of Salaries. Sort Salaries Above and Below. Output: Mean salary (real: Salariesbelow) Mean salary (real: Salariesabove) Pseudocode Declare Names [100], Salaries [100], of Reals Declare Number of Salaries, Above, Below As Real Set Sum = 0 Set Count1 = 0 Set K = 1 For K=1 Step Write "Enter Employees Name and Salary" Write "Enter *,0 when done." Input Name, Salary

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 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 End For End While 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...
View Full Document

{[ snackBarMessage ]}

### Page1 / 2

MB - While Salary<>"0" Set Count1 = Count1 1...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online