using System;
using System.Collections.Generic;
using System.Text;
namespace Factorial
{
class Program
{
static void Main(string[] args)
{
int i, n, fac = 1;
string s;
Console.Write("Please enter any number to find it's factorial(0 to 19):\n");
s = Console.ReadLine();
n = Int32.Parse(s);
for (i = 1; i <= n; i++)
{
fac = fac * i;
}
Console.WriteLine("\nThe factorial of '{0}' is {1}.",n,fac);
Console.Read();
}
}
}
INPUT/OUTPUT: 5/120
<snipped>