三元运算 三个数取最大的
生活随笔
收集整理的這篇文章主要介紹了
三元运算 三个数取最大的
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
class?TestSan?
{public?static?void?main(String[]?args)?{int?i=10;int?j=20;int?k=30;int?max?=?(i>j)??i:j;int?max1?=?(max>k)??max:k;System.out.println(max1);}
}
轉載于:https://blog.51cto.com/9815936/1600111
總結
以上是生活随笔為你收集整理的三元运算 三个数取最大的的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: cocos2d-html5 onEnte
- 下一篇: 编程挑战-进制转换