List number in decending order using AWK

Hi All,

Can anyone show me how to list the below numbers in decending order?
I have a code to find out whats the largest number though but can it be modified to in-corporate in function ?
Thanks in advance

Input:

20
30
10
40
50

Output:

50
40
30
20
10

BEGIN{
F[1] = 20;
F[2] = 30;
F[3] = 10;
F[4] = 40;
F[5] = 50;
}
{
for (i=1 ; i<4 ; i++) {
        if (F > HIGH_F) {HIGH_F = F}

}
}
END{printf("Largest number is %s",HIGH_F) }

The mawk manual page has an example isort implementation in awk.

why not use 'sort'?

'sort -r inputfile'