Thread: A small puzzle
View Single Post
  #1 (permalink)  
Old July 28th, 2006, 06:43 PM
marianeeli marianeeli is offline
Registered User
 
Join Date: Jul 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default A small puzzle

hai

We have two variables X,Y
and say X = 8;
        Y = 5;
Now how can you interchange values of these variables?
with out using third variable
 i.e Z = X; X = Y; y = z;
or any function
 i.e interchange(X,Y).
This can be achieved by simple mathematical mathod.

http://www.amsterdamhotels.at/
http://www.indianhillresorts.info/
http://www.cheapparishotels.info
Reply With Quote