You are on page 1of 1

namespace Factorial

class Program

static int Factorial(int N)

if (N == 0)

return 1;

else

return N * Factorial(N - 1);

static void Main(string[] args)

int Numero;

Console.Write("Ingrese Numero: ");

Numero = int.Parse(Console.ReadLine());

Console.WriteLine("{0}!={1}", Numero, Factorial(Numero));

Console.ReadKey();

You might also like