ExecuteAutomation

Factorial using C#

Here is the algorithm Here is the code snippet
        public static void Fact(int number)
        {
            int fact = 1;
            for (int i = number; i > 0; i--)
            {
                fact = fact * number;
                number--;
            }
            Console.WriteLine(fact);
        }
Thanks, Karthik KK