C# Console döngüler ile faktöriyel hesaplama


C# Console döngüler ile faktöriyel hesaplama
{
   static void Main([] args)
  {
    Console.WriteLine("bir sayı giriniz :")
    Console.WriteLine("-------------------------------------------------------"
    Console.Write("Girilen sayı : ")
    int n1 = Convert.ToInt32(Console.ReadLine());
    long fact = FactCalc(n1);
    Console.WriteLine(" The factorial of {0} is : {1} ", n1, )
    Console.ReadKey()
  }
  private static long FactCalc(int n1)
  {
    if (n1 == 0)
    {
      return 1;
    }
    return n1 * FactCalc(n1 - 1);
  }
 
}