20.12.2013, 23:17
Could someone point me to the right direction about this.
How to arrange variables by their values.
Like
Stat[0] = 3;
Stat[1] = 5;
Stat[2] = 1;
Stat[3] = 6;
how to arrange them by max, so result is something like this:
Stat[3] = 6;
Stat[1] = 5;
Stat[0] = 3;
Stat[2] = 1;
Right now Im trying with two loops by getting max and comparing if others is bigger, but no success.. :S
How to arrange variables by their values.
Like
Stat[0] = 3;
Stat[1] = 5;
Stat[2] = 1;
Stat[3] = 6;
how to arrange them by max, so result is something like this:
Stat[3] = 6;
Stat[1] = 5;
Stat[0] = 3;
Stat[2] = 1;
Right now Im trying with two loops by getting max and comparing if others is bigger, but no success.. :S