Exchanging

Discuss Computer Science and Programming related problems

Moderators:Labib, bristy1588

Hasib
Posts:238
Joined:Fri Dec 10, 2010 11:29 am
Location:খুলনা, বাংলাদেশ
Contact:
Re: Exchanging

Unread post by Hasib » Sun Dec 26, 2010 7:14 pm

Sakib vai,


i have solved the problem before giving the ques, Zubaer vai send it me. After doing the solution i gave here :)

oh, i kno another easy solution(i discovered. Lol)

a=ab;
b=a/b;
a=a/b;


;) <3
A man is not finished when he's defeated, he's finished when he quits.

User avatar
Mohaimin
Posts:38
Joined:Thu Dec 09, 2010 7:38 pm
Location:Dhaka
Contact:

Re: Exchanging

Unread post by Mohaimin » Thu Dec 30, 2010 5:58 pm

I have another way, which is much similar to Hasib's one

Code: Select all

a = a+b;
b = a - b;
a = a - b;

Post Reply