Run Code
|
API
|
Code Wall
|
Users
|
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
Please
log in
to post a comment.
123
adxasaxsdf
reverseandcheck
Command design pattern
xx
Test Random
Enumerable
Lab8
hello-shared
V5
Please log in to post a comment.