Advertisement
Guest User

Untitled

a guest
Aug 21st, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. #include<iostream>
  2. using namespace std;
  3. int main()
  4. {
  5. int x,y,temp;
  6. cout<<"value of x before swaaping:"<<endl;
  7. cin>>x;
  8. cout<<"value of y before swapping"<<endl;
  9. cin>>y;
  10. temp=x;
  11. x=y;
  12. y=temp;
  13. cout<<"\nvalue of x after swapping:"<<" "<<endl<<x<<endl;
  14. cout<<"\nvalue of y after swappinf:"<<" "<<endl<<y<<endl;
  15. return 0;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement