1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
int main()
{
int Finis[8] = {1, 8, 4, 3, 2, 5, 7, 6};
int ID[8] = {1, 2, 3, 4, 5, 6, 7, 8};
int x =0;
for (int i = 0; i < 8; i++)
{
int mim = i;
for (int j = i+1; j < 8; j++)
{
if (Finis[j] > Finis[mim])
{
mim = j;
}
}
int aux = Finis[mim];
Finis[mim] = Finis[i];
Finis[i] = aux;
cout << Finis[i] << endl;
}
return 0;
}
|