Last active
January 10, 2017 11:20
-
-
Save anthonylangsworth/7d12cca4f48e85faa1b15618eda87d8c to your computer and use it in GitHub Desktop.
100 Factorial + 1 in C# (BCL only)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Linq; | |
using System.Numerics; | |
namespace Fact | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
Console.WriteLine(Enumerable.Range(1, 100).Aggregate(new BigInteger(1), (b, i) => b *= i) + 1); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment