c# Code
public static int Func(int n) { if (n < 0) { throw new ArgumentException(“不能小于0”); } if (n == 0 || n == 1) { return 1; } return n * Func(n – 1); }
c# Code
public static int Func(int n) { if (n < 0) { throw new ArgumentException(“不能小于0”); } if (n == 0 || n == 1) { return 1; } return n * Func(n – 1); }