Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Code challenge: Factorial
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { Func<int,int> factorial = n => n > 0 ? Enumerable.Range(1,n) .Aggregate( (a,b) => a*b ) : 1; int[] numbers = { 0, 2, 3, 4, 5, 9 }; Array.ForEach(numbers, n => { Console.WriteLine("{0}! = {1}", n, factorial(n)); }); } } }
run
|
edit
|
history
|
help
0
hamming distance
C# URI parts url
Operator operates. Op!
Оператор switch
sdefuy6j87uytgr
1.2 Basics: object orientation
ggggg
vcdgdfgdfdfd
Explicit Interface Implementation
בדיקה כמה פעמים מערך אחד כלול במערך אחר