Hello Blue Crystal...
Your second method is absolutely fine. There is a
minor change to be made in the 1st method.
--- Blue Crystal <[EMAIL PROTECTED]> wrote:
> Hello Dude, here is some more method of swapping of
> two numbers.
> Works number that is not Zero.
> ie, A!=B!=0;
>
> a=a*b;
> a=a/b;
> b=b/a;
>
You got the order wrong It is
a=a*b;
b=a/b;
a=a/b;
> 2nd method works for all values.
> a=b+a-(b=a);
I donot know why the following method should work at
all. But I have not verified it.
>
> I guess this method works for negative numbers.
> a=a^b;
> b=b^a;
> a=a^b;
>
> if i'm wrong plz do correct me.... Thank you.
Regards,
Srikanth
____________________________________________________________________________________Be
a better Globetrotter. Get better travel answers from someone who knows.
Yahoo! Answers - Check it out.
http://answers.yahoo.com/dir/?link=list&sid=396545469