public class Main { public static void main(String[] args) { int num = 5; int result = 1; //팩토리얼 // ex) 5 * 4 * 3 * 2 * 1 for (int i=num; i > 0; i--){ result *= i; } System.out.println("팩토리얼 함수 입니다" + result); } }