Punchcard

Fibonacci

Jul 5th, 2023
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.16 KB | Source Code | 0 0
  1. uint64_t Fibonacci (int in, int n = 0, int n1 = 1) {
  2.    
  3.     uint64_t feb = n + n1; 
  4.     if(in > 2) {
  5.        
  6.         feb = Fibonacci(--in, n1, n + n1);
  7.     }  
  8.    
  9.     return feb;
  10. }
Advertisement
Add Comment
Please, Sign In to add comment