oh try this then:

Code:

#include <stdio.h>
#define NUM 10 /* This means that 10 integers will be re aranged*/
int main(void)
{
int aa, bb, cc, dd;
int vv[NUM];
int dec[NUM];
printf("Please enter %d integers to be sorted\n", NUM);
for ( aa = 0; aa < NUM; aa++ )
{
printf("Enter an integer %2d : ", aa+1 );
scanf("%d", &vv[aa]);
}
for ( bb = NUM-1; bb > 0; bb-- )
{
dd = 0;
for ( aa = 0; aa < bb; aa++ )
{
if ( vv[aa] > vv[aa+1] )
{
/* Swap values */
cc = vv[aa];
vv[aa] = vv[aa+1];
vv[aa+1] = cc;
dd++; /* Increment counter */
}
}
if ( dd == 0 )
break;
}
bb = NUM - 1;
/* fill a new array with the results in descending order */
for ( aa = 0; aa < NUM; aa++ ) {
dec[aa] = vv[bb];
bb --;
}
printf("\nThe new order of numbers is :\n");
for ( aa = 0; aa < NUM; aa++ )
{
printf("New order: %2d is %d and %d\n", aa+1, vv[aa], dec[aa]);
}
printf("\n\n");
system("pause");
return 0;
}

gives this result:

Code:

Please enter 10 integers to be sorted
Enter an integer 1 : 92
Enter an integer 2 : 52
Enter an integer 3 : 10
Enter an integer 4 : 24
Enter an integer 5 : 68
Enter an integer 6 : 29
Enter an integer 7 : 15
Enter an integer 8 : 63
Enter an integer 9 : 29
Enter an integer 10 : 8
The new order of numbers is :
New order: 1 is 8 and 92
New order: 2 is 10 and 68
New order: 3 is 15 and 63
New order: 4 is 24 and 52
New order: 5 is 29 and 29
New order: 6 is 29 and 29
New order: 7 is 52 and 24
New order: 8 is 63 and 15
New order: 9 is 68 and 10
New order: 10 is 92 and 8
Press any key to continue . . .