rendered paste bodyvoid sortAr( int studentID[], float progAvg[], float testAvg[],float overallAvg[], int studentcount)
{
int top = 0, last = 19, ptr, ssf;
int temp;
float temp2;
for ( top=0, ssf=0; ptr <= 19; ptr++)
{
ptr = top;
ssf = top;
if ( ptr <= last)
{
if ( studentID[ptr] < studentID[ssf])
{
ssf = ptr;
}
ptr++;
}
temp = studentID[top];
studentID[top] = studentID[ssf];
studentID[ssf] = temp;
temp2 = progAvg[top];
progAvg[top] = progAvg[ssf];
progAvg[ssf] = temp;
temp2 = testAvg[top];
testAvg[top] = testAvg[ssf];
testAvg[ssf] = temp;
top++;
}
}