Script Viewer
C#
Example 3
Download
Save Modified
/* C# - Factorial Example */ using System; public class FactorialExample { public static void Main() { int i,fact=1,number; Console.Write("Enter any Number: "); number= int.Parse(Console.ReadLine()); for(i=1;i<=number;i++){ fact=fact*i; } Console.Write("Factorial is: "+fact); } }