// 交换法排序
void ExchangeOrder()
{
    const int nCount = 9;
    int data[nCount] {3, 5, 9, 2, 8, 5, 7, 2, 1};

    for (int i = 0; i < nCount; i++) {
        for (int j = i + 1; j < nCount; j++) {
            if(data[i] > data[j])
            {
                Swap(data[i], data[j]);
            }
        }
    }

    for (int i = 0; i < nCount; i++) {
        std::cout << data[i] << std::endl;
    }
}