Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
itervativeFact
//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 long factorial (int n) { if (n <=0) { Console.WriteLine("Enter +ve no"); } long fact = 1; while( n > 0) { fact *= n; n=n-1; } return fact; } public static void Main(string[] args) { int n = 5; Console.WriteLine(factorial(n)); } } }
run
|
edit
|
history
|
help
0
X o X
My C# (2)
a.out
/*Dizide bulunan sayıların en büyük iki ve en küçük ikisini bulma*/
Tarkov Time
Explanation about Aggregate method in C#
Hello World!
How do I calculate someone's age in C#?
== and Equals Differeance in C#
Reflection custom test