728x90
두 수 비교하기


|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
class BeakJoon_1330_2{
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) ? "<":"==")));//A가 크면 > B가 크면 < 같으면 ==
}
}
|
cs |
728x90
'Dev > 알고리즘 ,자료구조' 카테고리의 다른 글
| [Algorithm]BeakJoon_1931 (0) | 2021.07.18 |
|---|---|
| [Algorithm]BeakJoon_14681 (0) | 2021.07.18 |
| Insertion_Sort(삽입 정렬) (0) | 2021.06.30 |
| Selection_Sort(선택 정렬) (0) | 2021.06.29 |
| Bubble_Sort(거품 정렬)+JAVA로 구현 (0) | 2021.06.28 |