본문 바로가기
(문제풀이)

백준 1330(java) : 두 수 비교하기

by cogito-new 2022. 10. 3.

 

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		String[] A = sc.nextLine().split(" ");
		int a = 0;
		int b = 0;
		a = Integer.parseInt(A[0]);
		b = Integer.parseInt(A[1]);		
		if( a>b) {
			System.out.println(">");
		} else if ( a<b) {
			System.out.println("<");
			
		} else if ( a==b) {
		System.out.println("==");
		}
	}

}

 

반응형