原文发布时间为:2009-03-01 —— 来源于本人的百度文章 [由搬家工具导入]

using System;
//using System.Collections.Generic;
//using System.Text;

namespace digui1
{
    public class Program
    {
       public static void Main()
        {
            int n;
            n = int.Parse(Console.ReadLine());
            Console.WriteLine("{0}!={1}.", n, fun(n));
            Console.ReadLine();
        }
        public static int fun(int n)
        {
            if (n <= 1)
                return 1;
            else
                return n * fun(n - 1);
        }
    }
}

相关文章:

  • 2022-02-21
  • 2021-12-06
  • 2021-08-28
  • 2021-11-08
  • 2021-12-23
  • 2021-12-10
  • 2021-12-07
  • 2022-12-23
猜你喜欢
  • 2021-08-01
  • 2022-02-20
  • 2021-10-18
  • 2021-08-11
  • 2022-01-18
相关资源
相似解决方案