using System; namespace Example63 { /// /// Summary description for Class1. /// class Class1 { /// /// The main entry point for the application. /// [STAThread] static void Main(string[] args) { Console.Write("Input n: "); int n = int.Parse(Console.ReadLine()); Console.WriteLine("{0}! = {1}", n, fact(n)); } static int fact(int n) { if (n == 0) return 1; else return n * fact(n - 1); } } }