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