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+"是最大值"); }}
求多个数中最大值
原文:https://www.cnblogs.com/shlo/p/11666179.html