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