码迷,mamicode.com
首页 > 其他好文 > 详细

求多个数中最大值

时间:2019-10-13 15:28:10      阅读:58      评论:0      收藏:0      [点我收藏+]

标签:stat   class   oid   void   system   rgs   main   多个   string   

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+"是最大值");
}
}

求多个数中最大值

标签:stat   class   oid   void   system   rgs   main   多个   string   

原文地址:https://www.cnblogs.com/shlo/p/11666179.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!