fork download
  1. #include <stdio.h>
  2. int seq(){
  3. static int f=1;
  4. f=3*f+1;
  5. return f;
  6. }
  7.  
  8. int main(void) {
  9. int i;
  10. for(i=2;i<=10;i++)
  11. printf("%d\n",seq());
  12. return 0;
  13. }
  14.  
Success #stdin #stdout 0.01s 5288KB
stdin
Standard input is empty
stdout
4
13
40
121
364
1093
3280
9841
29524