fork download
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5. int a[10];
  6. int i;
  7.  
  8. a[0] = 3;
  9.  
  10. for(i = 1; i < 10; i++)
  11. {
  12. a[i] = a[i - 1] * 2;
  13. }
  14.  
  15. for(i = 0; i < 10; i++)
  16. {
  17. printf("%d ", a[i]);
  18. }
  19.  
  20. return 0;
  21. }
Success #stdin #stdout 0s 5300KB
stdin
Standard input is empty
stdout
3 6 12 24 48 96 192 384 768 1536