C program to swap two numbers without third number
C program to swap two numbers without third number by Programming Seekerz
pcphunt.blogspot.com
pcphunt.blogspot.com
A = A operation B
B = A inverse-operation B
A = A inverse-operation B
#include<iostream.h>
void main()
{
int a,b;
cout<<"\n\nEnter the two no=:";
cin>>a>>b;
cout<<"\na"<<a<<"\nb"<<b;
a=a+b;
b=a-b;
a=a-b;
cout<<"\n\na="<<a<<"\nb="<<b;
}
Post a Comment