//1、得到最小值
private static int min(int... is) {
int min = Integer.MAX_VALUE;
for (int i : is) {
if (min > i) {
min = i;
}
}
return min;
}
// 2、得到最小值
private static int min(int one, int two, int three) {
return (one = one < two ? one : two) < three ? one : three;
}
求最小值(java)
猜你喜欢
转载自blog.csdn.net/wwqqyy123456/article/details/86237179
今日推荐
周排行