最赞回答 / fy491423
int getMaxOrMin(int *arr, int count, bool isMax){ int temp = arr[0]; for (int i = 1; i < count; i++) { if (isMax) { if (temp < arr[i]) { temp = arr[i]; } } else { if (temp > arr[i]) { temp = arr[i]; } } }return temp;}获取最大值...
2016-04-07