목차
1. 문제


2. 맞춘코드
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
public class bj14681{
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int x, y, qua;
x = Integer.parseInt(br.readLine());
y = Integer.parseInt(br.readLine());
if(x>0 && y>0) qua = 1;
else if(x>0 && y<0) qua = 4;
else if(x<0 && y>0) qua = 2;
else{qua = 3;}
System.out.println(qua);
}
}
'💻 문제풀고 정리하기 + > 백준' 카테고리의 다른 글
| [백준 Java] 2525: 오븐 시계 (0) | 2023.08.29 |
|---|---|
| [백준 Java] 2884: 알람 시계 (0) | 2023.08.29 |
| [백준 Java] 2753: 윤년 (0) | 2023.08.29 |
| [백준 Java] 9498: 시험 성적 (0) | 2023.08.29 |
| [백준 Java] 1330: 두 수 비교하기 (0) | 2023.08.29 |