import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int A = scan.nextInt();
int B = scan.nextInt();
if(A > B) {
System.out.println(">");
} else if(A < B) {
System.out.println("<");
} else if(A == B) {
System.out.println("==");
}
}
}
https://st-lab.tistory.com/21
블로그에서 확인하고 다르게 푸는 방법 실습해보았다.
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.StringTokenizer;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String str = br.readLine();
StringTokenizer st = new StringTokenizer(str, " ");
int A = Integer.parseInt(st.nextToken());
int B = Integer.parseInt(st.nextToken());
System.out.println((A>B) ? ">" : ((A<B) ? "<" : "=="));
}
}
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String[] str = br.readLine().split(" ");
int A = Integer.parseInt(str[0]);
int B = Integer.parseInt(str[1]);
System.out.println((A>B) ? ">" : ((A<B) ? "<" : "=="));
}
}