SHARE
TWEET

Sirul lui Fibonacci recursiv - TPN

hopingsteam Feb 12th, 2019 142 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Sirul lui Fibonacci recursiv - https://tutoriale-pe.net/
  2. int Fib(int n) {
  3.     if(n <= 0) {
  4.         return 0;
  5.     }
  6.     else if(n == 1) {
  7.         return 1;
  8.     }
  9.     else {
  10.         return Fib(n - 1) + Fib(n - 2);
  11.     }
  12. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top