fork(1) download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int a[30],i;
  5. a[0] = 2;
  6. a[1] = -1;
  7.  
  8. for(i=2;i<=30;i++){
  9. a[i] = -a[i-1] + a[i-2] +2;
  10. }
  11.  
  12.  
  13.  
  14.  
  15. return 0;
  16. }
  17.  
Success #stdin #stdout 0s 5268KB
stdin
Standard input is empty
stdout
Standard output is empty