Advertisement
dimitrix85

Untitled

Aug 2nd, 2021
886
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.17 KB | None | 0 0
  1. public static int fib(int n)
  2.         {
  3.             if (n <= 2)
  4.             {
  5.                 return 1;
  6.             }
  7.  
  8.             return fib(n - 1) + fib(n - 2);
  9.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement