View Single Post
  #2 (permalink)  
Old 04-09-2008, 10:50 AM
amit's Avatar
amit amit is offline
Senior Member
411 posts this year. worth their weight in gold!
Trusted Member - And full of good stuff!
Last months UKWW Tokens: 22
 
Join Date: Feb 2008
Location: India
Posts: 225
Thanks: 0
Thanked 1 Time in 1 Post
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
Send a message via Yahoo to amit
Default

Here is one other method by which the values can be swaped in all the programing languages:
Quote:
Define 2 variable depending upon the syntax of the language:
a=20
b=30

Now compare both the variable if b>a then
a = b - a ==> 30 - 20 = 10
b = b - a ==> 30 - 10 = 20
a = a + b ==> 10 + 20 = 30


Else vice varsa.

This will also do the work.
__________________
Have A Close Look SEOContest2008 || Website Design India
Reply With Quote