[Java 소스] if else 문 Program.java import java.util.Scanner; public class Program { static Scanner scanner = new Scanner(System.in); public static void main(String[] args){ exIfelse(); } private static void exIfelse() { int num; System.out.println("정수를 입력하세요."); num = scanner.nextInt(); if((num%2)==0){ System.out.println(num+"은 짝수"); } else{ System.out.println(num+"은 홀수"); } }} 실행 결과(홀수 입력 예)정수를 입..