fork download
  1. #include <stdio.h>
  2.  
  3. int main(void)
  4. {
  5. int a[7];
  6. a[0] = 2;
  7. printf("%d ", a[i]);
  8. int i = 0;
  9. while (1)
  10. {
  11. a[i+1] = a[i] + 3;
  12. printf("%d ", a[i]);
  13. i = i + 1;
  14. a[i+1] = a[i] + 2;
  15. printf("%d ", a[i]);
  16. i = i + 1;
  17. if(i == 6)
  18. break;
  19. }
  20.  
  21. system("pause");
  22.  
  23. return 0;
  24. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:7:19: error: ‘i’ was not declared in this scope
  printf("%d  ", a[i]);
                   ^
prog.cpp:21:2: error: ‘system’ was not declared in this scope
  system("pause");
  ^~~~~~
prog.cpp:21:2: note: suggested alternative: ‘sys_nerr’
  system("pause");
  ^~~~~~
  sys_nerr
stdout
Standard output is empty