Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Calculate Combinatorics (cards)
using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { int n = 10; int k = 6; decimal result = (GetFactorial(n) / (GetFactorial(k) * GetFactorial(n-k))); Console.WriteLine(result); } public static decimal GetFactorial(int n) { decimal result = 1; for (int i = n; i > 1; i--) { result = result * i; } return result; } } }
run
|
edit
|
history
|
help
0
Test date/time bug
project euler 15, C#
ERFDAX
miner
Terminus Code Example 1
Linq FirstOrDefault() null check in c#
megha
two words are anagrams
AKASH B AND HIS CODES\\
Math 10.96