C Program For Swapping

#include<constream.h>
void main()
{int a,b;
clrscr();
cout<<"Enter A = ";
cin>>a;
cout<<"Enter B = ";
cin>>b;
a=b+a;
b=a-b;
a=a-b;
cout<<"The Value of A= "<<a<<"\nThe Value of B= "<<b;
getch();
}
Bhanu Namikaze

Bhanu Namikaze is an Ethical Hacker, Security Analyst, Blogger, Web Developer and a Mechanical Engineer. He Enjoys writing articles, Blogging, Debugging Errors and Capture the Flags. Enjoy Learning; There is Nothing Like Absolute Defeat - Try and try until you Succeed.

No comments:

Post a Comment