fork download
  1. int f (int x){
  2. if (x== 0) return 1;
  3. else if (x==1) return 3;
  4. {
  5. printf("%d ", f(x-2/) + f(x-1 ));
  6. return f(x-1) + f(x-2);
  7. }
  8. }
  9. void main()
  10. {
  11. f(4);
  12. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c: In function ‘f’:
prog.c:5:9: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration]
         printf("%d    ", f(x-2/) + f(x-1 ));
         ^~~~~~
prog.c:5:9: warning: incompatible implicit declaration of built-in function ‘printf’
prog.c:5:9: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
prog.c:5:32: error: expected expression before ‘)’ token
         printf("%d    ", f(x-2/) + f(x-1 ));
                                ^
prog.c: At top level:
prog.c:9:6: warning: return type of ‘main’ is not ‘int’ [-Wmain]
 void main()
      ^~~~
stdout
Standard output is empty