//pgm to perform swapping without using a third variable
#include<iostream.h>
#include<conio.h>
void main()
{
int a,b;
clrscr();
a=10;
b=20;
a=a+b;
b=a-b;
a=a-b;
cout<<"a="<<a<<endl;
cout<<"b="<<b;
getch();
}
Please Click on ADS!!
Please Click on the above ads given by GOOGLE , so that I can maintain my blog!!
Tuesday, August 31, 2010
Subscribe to:
Post Comments (Atom)

0 comments:
Post a Comment