Month: August 2017

01
Aug
2017

Swap without a temp variable

It’s possible with addition: #include<iostream> using namespace std; int main(){ int x=10,y=15; cout<<“Before swapping: x=”<<x<<“y=”<<y<<endl; x=x+y; //25…