Hi all, i am having trouble in sorting my array in ascending order according to the area calculated. However, i have succeeded in sorting it in descending order based on one of the codes that was given to me by a kind soul.
May i know how do i sort it in ascending order? i`m sure its similar to the function below. I have tried to reverse the greater than sign but it doesn`t work. Can someone advise me on this?
Try to print the array before the sorting and look what will be printed. Also it is not clear what is the value of counter? For example you can substitute it for your magic number 100 and print your array.:)