Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Fibonacci recursion
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NERW using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static int Fibonacci (int x) { if(x==1||x==2) { return 1; } else { return Fibonacci(x-1)+Fibonacci(x-2); } } public static void Main(string[] args) { //Your code goes here Console.WriteLine( Fibonacci(5) ); } } }
run
|
edit
|
history
|
help
0
newDiv2by1
5454
Operadores
lambda funcs C#
Product, Category, Composition and Inheritance
Insertion Sort
DateTime.Now.Date
hello
1.2 Basics: object orientation
Card Shuffling