fork download
  1. #include <stdio.h>
  2.  
  3. int fibo(int x){
  4. int unko;
  5. if(x==1){
  6. return x;
  7. }
  8. else if(x==2){
  9. return 1;
  10. }
  11. else{
  12. unko=fibo(x-1)+fibo(x-2);
  13. return unko;
  14. }
  15. }
  16. int main(void) {
  17. int k;
  18. k=fibo(8);
  19. printf("%d", k);
  20. return 0;
  21. }
  22.  
Success #stdin #stdout 0.01s 5284KB
stdin
Standard input is empty
stdout
21