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