Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- using namespace std;
- int main()
- {
- int x,y,temp;
- cout<<"value of x before swaaping:"<<endl;
- cin>>x;
- cout<<"value of y before swapping"<<endl;
- cin>>y;
- temp=x;
- x=y;
- y=temp;
- cout<<"\nvalue of x after swapping:"<<" "<<endl<<x<<endl;
- cout<<"\nvalue of y after swappinf:"<<" "<<endl<<y<<endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement