順位の求め方。自分より点数が上のものの数+1

int rank(int i,int n,int a[]) {
int j, r = 1;
for(j = 0;j < n;i++) if(a[n] > a[i]) r++;
return r;
}