- #include<iostream.h>
- #include<conio.h>
- void main(){
- clrscr();
- int x,y;
- cout<<"\nenter first integer :";
- cin>>x;
- cout<<"\nenter second integer :";
- cin>>y;
- cout<<"\nthe original value in x="<<x<<" "<<"and y="<<y;
- x=x+y;
- y=x-y;
- x=x-y;
- cout<<"\nthe swapped value in x="<<x<<" "<<"and y="<<y;
- getch();
- }