Hello all! This is my first time posting in any of the forums so I hope I am in the right forum for my question...If not, someone please direct me to the right forum. Thanks in advance!
OK here is my situation...I am in a Fundamentals of Programming with Algorithms and Logic class. So far I have an A (five weeks into a nine week class:cheesy: ) I have an assignment that is due this evening. I feel ok about it but need some reassurance. If someone could look this over and let me know what you think it would be greatly appreciated. Thanks a bunch!
Assignment:
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.
Pseudocode:
Declare Names[100], Salaries[100]
Set Sum = 0
Set Count1 = 0
Set K = 1
Write “Enter Employees Name and Salary.”
Write “Enter *,0 when done.”
Input Name, Salary
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
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