I have to keep track of smallest and largest numbers of a set of five. I wondered if instead of something like (psudocode):

if num1 > num2

largest number is 1

if num2 > num3

largest number is 2

... and so on comparing all 5 numbers all to each I wondered if there is a quicker way, I'm sure there must be. Any help is appreciated, it really is.

Thanks,

Extro.