Computer Club MNNIT
Would you like to react to this message? Create an account in a few clicks or log in to continue.

swap without using temp variable

2 posters

Go down

swap without using temp variable Empty swap without using temp variable

Post  gunendu 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

Back to top Go down

swap without using temp variable Empty Re: swap without using temp variable

Post  vikas 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

Back to top Go down

Back to top

- Similar topics

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