标签:数组
int nMax = Integer.parseInt(arr[0]);//最大值
int nMin = Integer.parseInt(arr[0]);//最小值
for (int i = 0; i < arr.length; i++) {
if (nMin > Integer.parseInt(arr[i])) {
nMin = Integer.parseInt(arr[i]);
}
if (nMax < Integer.parseInt(arr[i])) {
nMax = Integer.parseInt(arr[i]);
}
}
标签:数组
原文地址:http://blog.csdn.net/wuzhiweiwuzhiwei/article/details/44900785