Search

if ~ else

public class Ex02_IfElse { public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.print("μ •μˆ˜ μž…λ ₯ : "); int num = sc.nextInt(); if( num % 2 == 1 ) System.out.println("ν™€μˆ˜ μž…λ‹ˆλ‹€."); else System.out.println("짝수 μž…λ‹ˆλ‹€."); sc.close(); } }
Java
볡사