Write an algorithm in pseudocode
Posted on 2010-08-16
I am really having problems with pseudocode as I have never had to use it before. I have been asked to write an algorithm in pseudocode that allows the user to input the selling prices of all homes in a town 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 number in the sorted list, if N is even
The user will terminate the input by entering a zero or a negative number.
I would really appreciate any help and would be so grateful if somebody could explain how I go about this.