public class TestJieCheng { public static void jiecheng(int n) { int result = 1; while(n > 1){ result *= n * (n - 1); n -= 2; } System.out.println("n的阶乘为:" + result); } public static void main(String[] args) { jiecheng(10); } }
30以内阶乘
最新推荐文章于 2024-03-21 22:47:12 发布