swap without using temp variable

Go down

swap without using temp variable

Post  gunendu on Wed Sep 24, 2008 11:29 am

another solution may be..

a=a*b;
b=a/b; (b!=0)
a=a/b;

gunendu

Posts : 2
Join date : 2008-09-24

View user profile

Back to top Go down

Re: swap without using temp variable

Post  vikas on Thu Sep 25, 2008 6:23 pm

bhai gunendu....
this will work only in the case of intergers.

vikas

Posts : 2
Join date : 2008-09-23

View user profile

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum