write a programme to interchanges the value of two variables usig only assignment operators.what is the minimum number of assignments operators required?

Answer :

#include<iostream.h>
#include<conio.h>
void main()
{
 clrscr();
 int a,b,c;
 cout<<"Enter two numbers.\na= ";
 cin>>a;
 cout<<"\nb= ";
 cin>>b;
 c=a;
 a=b;
 b=c;
 cout<<"After interchange a= "<<a<<"\nb= "<<b;
 getch();
}

Other Questions