这么容易的题,考场竟然没写出来,惭愧啊!书还得多看啊!
<span style="font-size:14px;">bool UpSort(int a[], int start, int end)//start为数组的第一个下标,end为数组的第二个下标
{
if (start == end)
return true;
else if (a[start] <= a[start + 1])
return UpSort(a, start + 1, end);
else
return false;
}</span>