[자바] 정올 124 : 선택제어문 - 형성평가5
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int mon = sc.nextInt(); int[] arr = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; System.out.println(arr[mon-1]); } }