// Example 2.20. Program to input an integer and print its square #include using namespace std; int main() { int num; // input int square; // square of num cout << "Please type in an integer: "; cin >> num ; square = num * num; cout << "The square of " << num << " is " << square << "." << endl; return 0; }