Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Problem_fb_series
//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) { //Your code goes here //Console.WriteLine("Hello, world!"); Console.Write("Enter the nth number of the Fibonacci Series: "); int number = Convert.ToInt32(Console.ReadLine()); number = number - 1; int NthNumber = NthFibonacciNumber(number); Console.Write(NthNumber); Console.ReadKey(); } public static int NthFibonacciNumber(int n) { if ((n == 0) || (n == 1)) { return n; } else { return (NthFibonacciNumber(n - 1) + NthFibonacciNumber(n - 2)); } } } }
run
|
edit
|
history
|
help
0
Simple StackOverflowException
New easy way to start lightweight threads
Get Country IP
a.k.java
Fórum ➡ Border of a string S with at least 3 non-overlapping solutions ( optimized version ) ♦
Where To Watch The Bad Guys (2022) Free online at Home
123
axasd
dsfsfsdf
Encrption & Decryption C#