swap


  1. #include<iostream.h>
  2. #include<conio.h>
  3. void main(){
  4. clrscr();
  5. int a,b,temp;
  6. cout<<"enter the first number a=";
  7. cin>>a;
  8. cout<<"enter the second number b=";
  9. cin>>b;
  10.  temp=a;
  11.  a=b;
  12.  b=temp;
  13. cout<<"the value after swapping are a="<<a<<" "<<"and b="<<b<<endl;
  14. getch();
  15. }