swap without using temp variable

Post new topic   Reply to topic

View previous topic View next topic Go down

swap without using temp variable

Post  gunendu on Wed Sep 24, 2008 5:29 pm

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 Fri Sep 26, 2008 12:23 am

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

View previous topic View next topic Back to top


Post new topic   Reply to topic
Permissions of this forum:
You cannot reply to topics in this forum