// pgm14 for loop and SCOPE // 9/26/2016 #include #include using namespace std; int main() { int _max = 1000; // _max below has BLOCK SCOPE and is not visible outside if (1 < 2) { int _max=2; } cout << _max << endl; // headings should print before for loop cout << "Number" << setw(9) << "Square" << endl; cout << "________________" << endl; // print numbers and squares from 1 to 10 int i=-9; for (int i; i<=10; i++) { cout << setw(3) << i << setw(9) << i*i << endl; } cout << "Fell out of for loop, i is: " << i << endl; return 0; } /* Modify faranheit and celcius program to use a for loop (pgm5.cpp in class programs). Print a table of the celcius and faranheit values going from 36 degrees celcius to 42 degrees celcius. */