/*
*三元运算符:
*表达是: 关系表达式 ? 表达式1:表达式2
*计算关系表达式如果是true,表达式1就是结果
*如果是flase,表达式2就是结果
*/
import java.util.Scanner;
public class OperatorDemo {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc = new Scanner(System.in);
while(sc.hasNext()) {
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
int e = (a>b) ? a : b;
boolean flag = (a==b) ? true : false;
boolean flag1 = (a==b);
int temp = (a>b) ? a : b;
int max = (temp>c) ? temp : c;
System.out.println(e);
System.out.println(flag);
System.out.println(flag1);
System.out.println(max);
}
}
}
10 20 30
20
false
false
30