나의 성장과정  
Front Page
Tag | Location | Media | Guestbook | Admin   
 
How to swap tow numbers without using Temporary variable or arithmetic operators?

http://www.thecrazyprogrammer.com/2014/02/how-to-swap-two-numbers-without-using-temporary-variable-or-arithmetic-operators.html


Lets take two numbers a=5 and b=7

temp=a;

a=b;

b=temp;


연산자를 이용해서 임시 변수없이도 멋지게 스왑할 수 있다. 




BLOG main image
Simple is beatiful!
 Notice
 Category
분류 전체보기 (755)
전직 (0)
일상 (7)
진행중 (6)
3Fs (14)
미정 (3)
Serendipitous! (6)
지르자 : 맥북 (5)
(5)
FaceBook (3)
 TAGS
Debug 커피 JavaScript 네트워크 Safari primitive Eclipse URL URLConnection Java color JS laserjet 사파리 CP1215 자바스크립트 HP tomcat 접근지정자 DOM
 Calendar
«   2024/04   »
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
 Recent Entries
 Recent Comments
 Archive
 Link Site
상상할 수 있는 힘이 ..
즐겁게살자
인생의 소중한 꿈
{fly to the ocean.com}
누노의 컴퓨토피아
한RSS
[지인]I can\'t stop. Love. Lo…
[원츄]OK 괜찮아 다 잘 될거야
[원츄]애자일 이야기
[원츄]IBM Developerworks
 Visitor Statistics
Total :
Today :
Yesterday :
rss