Write a program to interchange two variable using
the third variable
#include<iostream.h>
#include<conio.h>
Void main()
{
int a,b,temp;
cout<<”enter the values of a and b:”;
cin>>a>>b;
a=temp;
temp=b;
b=a;
cout<<”after interchanging=”<<a<<b<<endl;
getch();
}
the third variable
#include<iostream.h>
#include<conio.h>
Void main()
{
int a,b,temp;
cout<<”enter the values of a and b:”;
cin>>a>>b;
a=temp;
temp=b;
b=a;
cout<<”after interchanging=”<<a<<b<<endl;
getch();
}