Why? Once you've got the averages sorted in descending order, the first one gets rank 1. If the second average is the same as the first, it also gets rank 1 -- otherwise it gets rank 2.I am still struggling to get output . Pls tell me what to do ??? Till average calculation , I have completed ! Next Rank Calculation is little bit tuff for me !!