fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4.  
  5.  
  6. int main() {
  7. int x = 5, y = 5;
  8. cout << "start: " << x << "," << y << endl;
  9. if(1) {
  10. int x = 10;
  11. y = 7;
  12. cout << "nested: " << x << "," << y << endl;
  13. }
  14. cout << "end: " << x << "," << y << endl;
  15. }
  16.  
Success #stdin #stdout 0s 3468KB
stdin
Standard input is empty
stdout
start: 5,5
nested: 10,7
end: 5,7