#include <iostream>

void switchVar (int & x, int & y) {x+=y; y = x-y; x=x-y;}

int main () {
    int x = 3, y= 4;
    switchVar(x, y);
    std::cout << "X is: " << x << std::endl << "Y is: " << y << std::endl;
}