WAP To Swap Two Numbers.

#include<iostream.h>
#include<conio.h>
Void swap(int,int);
Void main()
{   clrscr();
     int a,b;
     cout<<”Enter two no.”;
     cin>>a>>b;
     swap(a,b);
     getch();
 }
  Void swap(int x,int y)
{    int temp;
     temp=x;
      X=y;
      Y=temp;
      cout<<”Value after swapping:”<<x<<”\t”<<y;

 }

Comments

Popular Posts