int temp;
int[] arrSort = new int[] { 10, 8, 3, 5, 6, 7, 9 };
for (int i = 0; i < arrSort.Length; i++)
{
for (int j = i + 1; j < arrSort.Length; j++)
{
if (arrSort[j] < arrSort[i])
{
temp = arrSort[j];
arrSort[j] = arrSort[i];
arrSort[i] = temp;
}
}
}
浙公网安备 33010602011771号