The function works if the avgscore contains int value. But if I change the avgscore array to double value, it doesn\'t work. What all changes I need to do to make it sort th