fork download
  1. #include <stdio.h>
  2.  
  3. int fib(int n)
  4. {
  5. return n<3?2:fib(n-1)+fib(n-2);
  6. }
  7.  
  8. int main()
  9. {
  10. printf("%5d",fib(5));
  11. }
Success #stdin #stdout 0s 3340KB
stdin
Standard input is empty
stdout
   10