14681 자바1 백준 단계별 문제 <if문 > [14681번] : 사분면 고르기 자바 import java.util.*; public class Main{ public static void main(String args[]){ Scanner sc = new Scanner(System.in); int x = sc.nextInt(); int y = sc.nextInt(); sc.close(); if(x>0){ if(y>0) System.out.print(1); else System.out.print(4); } else{ if(y>0) System.out.print(2); else System.out.print(3); } } } [2884번] : 알람 시계 import java.util.*; public class Main{ public static vo.. 2022. 1. 20. 이전 1 다음 반응형