fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. long int fib(int n) {
  5. if (n<3)
  6. return 1;
  7. return fib(n-2)+fib(n-1);
  8. }
  9. int main(){
  10. cout<<fib(4)<<" , "<<fib(11)<<endl;
  11. cout<<endl;
  12. return 0;
  13. }
Success #stdin #stdout 0s 5320KB
stdin
Standard input is empty
stdout
3 , 89