برنامه ای بنویسید که عددی از کاربر دریافت کند و سپس فاکتوریل آن را محاسبه نماید.

 

 

static void Main(string[] args)
}    
;int s = fact(5)         
;Console.Write(s)         
;()Console.ReadKey         
{     

public static int fact(int n)
}   
if (n>1)      
}          
;return n * fact(n - 1)             
{          
else         
}          
;return 1          
{          

        {