package _8;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int num = sc.nextInt();
int result = 1;
for (int i = num; i >= 1 ; i--) {
result *= i;
}
System.out.println("팩토리얼 : " + result);
}
}
'JAVA > 프로그래머스' 카테고리의 다른 글
10. 숫자사각형1 (0) | 2020.12.21 |
---|---|
9. 숫자 자리수의 합 (0) | 2020.12.21 |
7. 소수 판별 (0) | 2020.12.21 |
6. 최대공약수 GCD (0) | 2020.12.20 |
5. 대문자 ↔ 소문자 (0) | 2020.12.20 |