dh-winternagi 님의 블로그
(14681) 사분면 고르기 본문
https://www.acmicpc.net/problem/14681
단계별로 풀어보기
2단계(조건문) 4번째

어제 풀었지만 티스토리 블로그 글 15개 제한에 걸렸다.
#include <iostream>
using namespace std;
int main()
{
int x, y;
cin >> x >> y;
if(x>0 && y>0) cout << 1;
else if(x<0 && y>0) cout << 2;
else if(x<0 && y<0) cout << 3;
else cout << 4;
return 0;
}'백준 (C++) > Solve' 카테고리의 다른 글
| (2525) 오븐 시계 (0) | 2026.04.08 |
|---|---|
| (2884) 알람 시계 (0) | 2026.04.08 |
| (2753) 윤년 (0) | 2026.04.07 |
| (9498) 시험 성적 (0) | 2026.04.07 |
| (1330) 두 수 비교하기 (0) | 2026.04.07 |
