- #1
Travian
- 64
- 0
Homework Statement
Write an algorithm in pseudocode that allows the user to input the selling prices of all homes at Kingston sold during 2009 and determine the median selling price. The median of a list of N numbers is as follows:
the middle number of the sorted list, if N is odd
the average of the two middle numbers in the sorted list if N is even.
The user will terminate the input by entering a zero or a negative number.
Homework Equations
The Attempt at a Solution
Code:
Declare Counter as integer
Declare Number as float
Set Counter = 0
Set Number = -1
Display "Enter a number. Enter a zero or negative number to finish"
WHILE Number > 0
?
ENDWHILE