#include <iostream>
int main() // x, y created here
{
std::cout<< “Enter an integer: “;
int x; // x init … here
std::cin >> x;

std::cout&lt;&lt; "Enter a larger integer: ";
int y; // y init... here
std::cin &gt;&gt; y;
//Swapping the values
    if(x &gt; y){
        int temp; //temp init... here
        temp = x;
        x = y;
        y = temp;
        std::cout&lt;&lt; "The smaller value is: "&lt;&lt; x &lt;&lt; std::endl;
        std::cout&lt;&lt; "The bigger value is: "&lt;&lt; y &lt;&lt; std::endl;
    } // temp dies here
    else
    {
        std::cout&lt;&lt; "The smaller value is: "&lt;&lt; x &lt;&lt; std::endl;
        std::cout&lt;&lt; "The bigger value is: "&lt;&lt; y &lt;&lt; std::endl;
        }
    //else
      //  std::cout&lt;&lt; "SOrry, I cannot compare, because "&lt;&lt; " x is:  "&lt;&lt;x &lt;&lt;" and y is: "&lt;&lt;y &lt;&lt; std::endl;

return 0;

} // x , y dies here