#include <iostream>
using namespace std;
void swap(int& x , int& y){
    int temp;
    temp = x;
    x=y;
    y=temp;
}

int main() {
    int x;
    cin>>x;
    int y;
    cin>>y;
    cout<<x<<"  "<<y<<endl;
    swap(x,y);
    cout<<x<<"  "<<y<<endl;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: