#include using namespace std; int main() { // variables must be declared before they're used int x; // variable x is visible, usable, "in scope" // from the point of declaration // within the surrounding { } x = 5; int y = 10; cout << x << " and " << y << endl; if ( x == 5 ) { int z = x; // z is in scope within the // body of the if statement z += 3; int y = 15; // this y is DIFFERENT than x += 4; // the y up on line 13 cout << x << " and " << y << " and " << z << endl; } // y = z; // THIS IS NOT ALLOWED (z is out of scope) cout << x << " and " << y << endl; return 0; }