You are on page 1of 1

{

int i, temp, t;
char* tempb;
char* tempc;
do
{
t=0;
for(i=0; i<(n-1);i++)
{
if(a[i]<a[i+1])
{
temp = a[i];
tempb = b[i];
tempc = c[i];
a[i] = a[i+1];
b[i] = b[i+1];
c[i] = c[i+1];
a[i+1] = temp;
b[i+1] = tempb;
c[i+1] = tempc;
t = 1;
}
}
}while (t==1);
ListBox9->Items->Clear();
ListBox10->Items->Clear();
ListBox11->Items->Clear();
i=0;
while (i<n)
{
ListBox9->Items->Add(a[i]);
ListBox10->Items->Add(b[i]);
ListBox11->Items->Add(c[i]);
i=i+1;
}
}

You might also like