Click here to Skip to main content
15,843,937 members
Articles / Programming Languages / C#

Calculate the Factorial of an Integer in C#

Rate me:
Please Sign up or sign in to vote.
5.00/5 (1 vote)
19 Oct 2011CPOL 12.3K  
My preference for run-time speed is:long Factorial(int input){ if (input 1; input--) { if (long.MaxValue - answer < answer) throw new...

Views

Daily Counts

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer State of Arkansas & Zycron
United States United States
Bryan Lee learned to code on a RadioShack Color computer II.

Comments and Discussions