package com.dream.controls; // 단순 if문 두번을 사용해서 숫자가 홀수인지 짝수인지 구분하여 출력하세요. public class ControlEx2 { public static void main(String[] args) { int num = 190; String str = ""; //if(num%2 == 0) str = "짝수"; //if(num%2== 0) str = "홀수"; if(num%2 == 0) str="짝수"; else str = "홀수"; System.out.println(num+"은"+str+"이다."); } }