
โ
๋ฌธ์ 1๋ณด๋ค ํฐ ์ ์(N)์ ์
๋ ฅํ๋ฉฐ N!๊ฐ์ ๊ตฌํ์์ค.*ํฉํ ๋ฆฌ์ผ์ด๋ N์ ์๋ณด๋ค ์๊ฑฐ๋ ๊ฐ์ ๋ชจ๋ ์์ ์ ์์ ๊ณฑex) 3! = 1 x 2 x 3 => 6โ
์ฝ๋public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.print("์
๋ ฅ : "); int n = sc.nextInt(); // ๋ณ์ ์ด๊ธฐํ int factorial = 1; // n๋ถํฐ 1๊น์ง์ ๋ชจ๋ ์์ ์ ์๋ฅผ ๊ณฑํจ for (int i = 1; i โ
์ถ๋ก ๊ณผ์ int factorial = 1;: ํฉํ ๋ฆฌ์ผ ๊ฐ์ ..