#include
using namespace std;
void swap(int x, int y)
{
int z = x;
x = y;
y = z;
}
int main()
{
int shu[] = { 3, 0, 2, 1, 7, 11, 9, 4, 1, 6 };
for (int i = 0; i < 10; i++)
{
int n = i;
for (int j = i + 1; j < 10; j++)
{
if (shu[j] < shu[n]) n = j;
}
swap(shu[i], shu[n]);
}
for (int i = 0; i < 10; i++)
cout << shu[i] << endl;
}
void swap(int x, int y)
->
void swap(int& x, int& y)
看看