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