用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);
}
}
原文地址: http://www.cveoy.top/t/topic/bVbP 著作权归作者所有。请勿转载和采集!