I saw a solution from the internet but i am not able to get this
#include
using namespace std;
int main()
{
int x = 12, y = 14;
x = x + y; // x = 60
y = x - y; // y = 10
x = x - y; // x = 50
cout << "After Swapping: x = " << x << ", y = " << y;
}
if i take x = 32 and y = 14
then x = x+y which will be 32+14 = 46
similarly y = x-y i.e 46-14 = 18
then x = x-y i.e 46-18 = 28
but when i run the code the ouput shows the swapped numbers. Kindly help me with this. Thanks!