본문 바로가기

프로그래밍/자바

[자바] 정올 525 : 연산자 - 자가진단8

728x90
반응형
import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt(),b = sc.nextInt(),c = sc.nextInt();
        int max = a > b ? a : b;
        max = max > c ? max : c;
        System.out.println((max == a && (max != b || max != c)) + " " + (a==b && b==c));
    }
}
728x90
반응형