fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. int a;
  7. cin>>a;
  8. int tab[a];
  9. for(int i=0; i<a; i++)
  10. {
  11. cin>>tab[i];
  12. }
  13.  
  14. for(int i=a-1; i>=0; i++){
  15. }
  16. cout<<tab[i];
  17.  
  18.  
  19. return 0;
  20. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
2
7 1 2 3 4 5 6 7
3 3 2 11
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:16:14: error: ‘i’ was not declared in this scope
    cout<<tab[i];
              ^
stdout
Standard output is empty