3개의 정수를 입력 받아 첫 번째 수가 가장 크면 1 아니면 0을 출력하고 세 개의 수가 모두 같으면 1 아니면 0을 출력하는 프로그램을 작성하시오.
(JAVA는 1이면 true, 0이면 false를 출력한다.)
1 0
package com.jungol.algorithm035;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int a = scanner.nextInt();
int b = scanner.nextInt();
int c = scanner.nextInt();
if((a > b) && (a > c)) {
System.out.print(true + " ");
} else {
System.out.print(false + " ");
}
if((a == b) && (a == c)) {
System.out.print(true + " ");
} else {
System.out.print(false + " ");
}
scanner.close();
}
}