fork download
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5. int a[10];
  6. int i;
  7.  
  8. a[0] = 2;
  9. a[1] = 6;
  10.  
  11. for(i = 0; i < 8; i++)
  12. {
  13. a[i + 2] = a[i + 1] + a[i] * 2 - 3;
  14. }
  15.  
  16. for(i = 0; i < 10; i++)
  17. {
  18. printf("%d ", a[i]);
  19. }
  20.  
  21. return 0;
  22. }
Success #stdin #stdout 0s 5304KB
stdin
Standard input is empty
stdout
2 6 7 16 27 56 107 216 427 856