北京理工大学金旭亮老师C#(38—BigInteger)

static System.Numerics.BigInteger Factorial(int N)
        {
            System.Numerics.BigInteger result;
            if (N <= 1)
                return 1;
            else
                result = N * Factorial(N - 1);
            return result;
        }
  • 需要引用system.Numerics

猜你喜欢

转载自blog.csdn.net/weixin_42681308/article/details/88924976