Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Fibonacci Recursive C#
//Microsoft (R) Visual C# Compiler version 3.4.0-beta4-19562-05 (ff930dec) //Copyright (C) Microsoft Corporation. All rights reserved. using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static int fib(int cnt) { if (cnt <= 1) return cnt; else return (fib(cnt-1) + fib(cnt-2)); } public static void Main(string[] args) { int cnt = 15; for(int i=0; i <=cnt;i++) { Console.WriteLine((Program.fib(i)).ToString()); } } } }
run
|
edit
|
history
|
help
1
A2Z Dice Roll
encypt& dcrypt
dcsdasxsdcdf
train555555
test
Lab7
DotnetQ7
Simple inheritance
orytitoyt
kod 1