Skip to content

Instantly share code, notes, and snippets.

@anthonylangsworth
Last active January 10, 2017 11:20
Show Gist options
  • Save anthonylangsworth/7d12cca4f48e85faa1b15618eda87d8c to your computer and use it in GitHub Desktop.
Save anthonylangsworth/7d12cca4f48e85faa1b15618eda87d8c to your computer and use it in GitHub Desktop.
100 Factorial + 1 in C# (BCL only)
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