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