using System;
namespace Metodos
{
  class Program
  {
    public static long factorialnr(int n)
    {
      long f = 0;
      if (n == 0)
        return 1;
      else
      {
        f = 1;
        while (n > 0)
        {
          f = n * f;
          n--;
        }
        return f;
      }
    }

    public static long factorial(int n)
    {
      if (n == 0)
        return 1;
      else
        return n * factorial(n - 1);
    }

    public static void visualizar(params object[] matriz)
    {
      int i = 0;
      foreach (object x in matriz)
      {
        i++;
        Console.WriteLine("Parámetro " + i + " = " + x);
      }
      Console.WriteLine();
    }

    public static void Main(string[] args)
    {
      int num = 8;
      long fac = 0;

      fac = factorialnr(num);
      Console.WriteLine("Factorial de " + num + ": " + fac);

      fac = factorial(num);
      Console.WriteLine("Factorial de " + num + ": " + fac);

      visualizar(2);
      visualizar(2, 3.7);
      visualizar(2, 3.7, 8.125);
      
      Console.Write("Press any key to continue . . . ");
      Console.ReadKey(true);
    }
  }
}
