fork download
  1. #include<iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6.  
  7. {
  8. int x = 1;
  9. cout << x << endl;
  10. {
  11. cout << x << endl;
  12. int x = 2;
  13. cout << x << endl;
  14. {
  15. cout << x << endl;
  16. int x = 3;
  17. cout << x << endl;
  18.  
  19. }
  20. cout << x << endl;
  21.  
  22. }
  23. cout << x << endl;
  24.  
  25. }
  26.  
  27. return 0;
  28. }
Success #stdin #stdout 0s 3468KB
stdin
Standard input is empty
stdout
1
1
2
2
3
2
1