using System;
class Program
{
static int FactorialIterativo(int n)
{
int resultado = 1;
for (int i = 1; i <= n; i++)
{
resultado *= i;
}
return resultado;
}
static void Main()
{
int numero = 5;
Console.WriteLine("Factorial iterativo de " + numero + " es: " + FactorialIterativo(numero));
}
}
To embed this program on your website, copy the following code and paste it into your website's HTML: