public class demo08 {
public static void main(String[] args) {
int a = 20, b = 30, c = 40;
int d = (a>b) ? 20 : 30;
int max = (d>c) ? 30 : 40;
System.out.println(max+"是最大值");
}
}
求多个数中最大值
最新推荐文章于 2021-08-24 21:43:58 发布