Java 代码实现求三个数中的最大值
public class MaxOfThreeNumbers {
public static void main(String[] args) {
int a = 10;
int b = 20;
int c = 30;
int max = a;
if (b > max) {
max = b;
}
if (c > max) {
max = c;
}
System.out.println('最大值是:' + max);
}
}
原文地址: https://www.cveoy.top/t/topic/nipn 著作权归作者所有。请勿转载和采集!