<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
	<channel>
		<title>지환태</title>
		<link>http://zfanta.com/</link>
		<description>지환태의 헛질 블로그</description>
		<language>ko</language>
		<pubDate>Sat, 21 Apr 2012 23:10:56 +0900</pubDate>
		<generator>Tistory 1.1 (http://www.tistory.com/)</generator>
		<managingEditor>　환타</managingEditor>
		<image>
			<title>지환태</title>
			<url>http://cfs4.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczQudGlzdG9yeS5jb206L2F0dGFjaC8wLzEzMDAwMDAwMDAwMC5naWY%3D</url>
			<link>http://zfanta.com</link>
			<description>지환태의 헛질 블로그</description>
		</image>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/zfanta" /><feedburner:info uri="zfanta" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:feedFlare href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Ffeeds.feedburner.com%2Fzfanta" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2Fzfanta" src="http://www.newsgator.com/images/ngsub1.gif">Subscribe with NewsGator</feedburner:feedFlare><feedburner:feedFlare href="http://feeds.my.aol.com/add.jsp?url=http%3A%2F%2Ffeeds.feedburner.com%2Fzfanta" src="http://o.aolcdn.com/favorites.my.aol.com/webmaster/ffclient/webroot/locale/en-US/images/myAOLButtonSmall.gif">Subscribe with My AOL</feedburner:feedFlare><feedburner:feedFlare href="http://www.bloglines.com/sub/http://feeds.feedburner.com/zfanta" src="http://www.bloglines.com/images/sub_modern11.gif">Subscribe with Bloglines</feedburner:feedFlare><feedburner:feedFlare href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Ffeeds.feedburner.com%2Fzfanta" src="http://www.netvibes.com/img/add2netvibes.gif">Subscribe with Netvibes</feedburner:feedFlare><feedburner:feedFlare href="http://fusion.google.com/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2Fzfanta" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><feedburner:feedFlare href="http://www.pageflakes.com/subscribe.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2Fzfanta" src="http://www.pageflakes.com/ImageFile.ashx?instanceId=Static_4&amp;fileName=ATP_blu_91x17.gif">Subscribe with Pageflakes</feedburner:feedFlare><item>
			<title>블로그 다시 시작</title>
			<link>http://feedproxy.google.com/~r/zfanta/~3/O3hC2mQf4Ng/475</link>
			<description>&lt;p&gt;작심삼일도 100번 하면 1년.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="clear: none; float: none; text-align: left; "&gt;&lt;b&gt;한양대학교 화이팅~&lt;/b&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="text-align: left; clear: none; float: none; "&gt;&lt;span class="imageblock" style="display:inline-block;width:454px;"&gt;&lt;a href="http://cfile29.uf.tistory.com/original/14165D3F4F92ADB52CA2CC" rel="lightbox" target="_blank"&gt;&lt;img src="http://cfile29.uf.tistory.com/image/14165D3F4F92ADB52CA2CC" filemime="image/jpeg" filename="화이팅.png" height="232" style="" width="454"/&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="entry-ccl" style="clear: both; text-align: right; margin-bottom: 10px"&gt;
	&lt;img id="ccl-icon-475-0" class="entry-ccl-by" src="http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black01.png" alt="저작자 표시"/&gt;
	&lt;img id="ccl-icon-475-1" class="entry-ccl-nc" src="http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black02.png" alt="비영리"/&gt;
	&lt;img id="ccl-icon-475-2" class="entry-ccl-nd" src="http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black03.png" alt="변경 금지"/&gt;
	&lt;!--
	&lt;rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"&gt;
		&lt;Work rdf:about=""&gt;
			&lt;license rdf:resource="http://creativecommons.org/licenses/by-nc-nd/2.0/kr/" /&gt;
		&lt;/Work&gt;
		&lt;License rdf:about="http://creativecommons.org/licenses/by-nc-nd/"&gt;
			&lt;permits rdf:resource="http://web.resource.org/cc/Reproduction"/&gt;
			&lt;permits rdf:resource="http://web.resource.org/cc/Distribution"/&gt;
			&lt;requires rdf:resource="http://web.resource.org/cc/Notice"/&gt;
			&lt;requires rdf:resource="http://web.resource.org/cc/Attribution"/&gt;
			&lt;prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/&gt;
		&lt;/License&gt;
	&lt;/rdf:RDF&gt;
	--&gt;
&lt;/div&gt;
&lt;div class="tt-plugin tt-share-entry-with-sns tt-sns-icon-alignment-right tt-sns-icon-size-small"&gt;
	&lt;div class="tt-sns-wrap" id="ttSnsWrap-"&gt;
		&lt;ul class="tt-sns-service-default"&gt;
			&lt;li class="tt-sns-service-mypeople"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('mypeople', '', '');"&gt;마이피플&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-twitter"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('twitter', '', '');"&gt;트위터&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-facebook"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('facebook', '', '');"&gt;페이스북&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-other"&gt;&lt;a href="javascript:;" onmouseover="ShareEntryWithSNS.showLayer(event, '');" onmouseout="ShareEntryWithSNS.hideLayer(event, '');"&gt;더보기&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
		&lt;ul class="tt-sns-service-more" id="ttSnsServiceMore-" onmouseout="ShareEntryWithSNS.hideLayer(event, '');"&gt;
			&lt;li class="tt-sns-service-me2day"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('me2day', '', '');"&gt;미투데이&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-yozm"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('yozm', '', '');"&gt;요즘&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/div&gt;
	&lt;div class="tt-sns-clear"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style="text-align:right; padding-top:10px;"&gt;
&lt;iframe src="http://www.facebook.com/plugins/like.php?href=zfanta.com/475&amp;amp;layout=button_count&amp;amp;show_faces=true&amp;amp;width=90&amp;amp;action=like&amp;amp;font=tahoma&amp;amp;colorscheme=light&amp;amp;height=65" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:65px;" allowTransparency="true"&gt;&lt;/iframe&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/zfanta/~4/O3hC2mQf4Ng" height="1" width="1"/&gt;</description>
			<category>뻘소리</category>
			<category>블로그</category>
			<author>　환타</author>
			<guid isPermaLink="false">http://zfanta.com/475</guid>
			<comments>http://zfanta.com/entry/%EB%B8%94%EB%A1%9C%EA%B7%B8-%EB%8B%A4%EC%8B%9C-%EC%8B%9C%EC%9E%91#entry475comment</comments>
			<pubDate>Sat, 21 Apr 2012 21:55:09 +0900</pubDate>
		<feedburner:origLink>http://zfanta.com/475</feedburner:origLink></item>
		<item>
			<title>정봉혁이 조윤희를 좋아합니다.</title>
			<link>http://feedproxy.google.com/~r/zfanta/~3/HLTM0RdFS9c/472</link>
			<description>&lt;br /&gt;
레얼&lt;div class="entry-ccl" style="clear: both; text-align: right; margin-bottom: 10px"&gt;
	&lt;img id="ccl-icon-472-0" class="entry-ccl-by" src="http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black01.png" alt="저작자 표시"/&gt;
	&lt;img id="ccl-icon-472-1" class="entry-ccl-nc" src="http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black02.png" alt="비영리"/&gt;
	&lt;img id="ccl-icon-472-2" class="entry-ccl-nd" src="http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black03.png" alt="변경 금지"/&gt;
	&lt;!--
	&lt;rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"&gt;
		&lt;Work rdf:about=""&gt;
			&lt;license rdf:resource="http://creativecommons.org/licenses/by-nc-nd/2.0/kr/" /&gt;
		&lt;/Work&gt;
		&lt;License rdf:about="http://creativecommons.org/licenses/by-nc-nd/"&gt;
			&lt;permits rdf:resource="http://web.resource.org/cc/Reproduction"/&gt;
			&lt;permits rdf:resource="http://web.resource.org/cc/Distribution"/&gt;
			&lt;requires rdf:resource="http://web.resource.org/cc/Notice"/&gt;
			&lt;requires rdf:resource="http://web.resource.org/cc/Attribution"/&gt;
			&lt;prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/&gt;
		&lt;/License&gt;
	&lt;/rdf:RDF&gt;
	--&gt;
&lt;/div&gt;
&lt;div class="tt-plugin tt-share-entry-with-sns tt-sns-icon-alignment-right tt-sns-icon-size-small"&gt;
	&lt;div class="tt-sns-wrap" id="ttSnsWrap-"&gt;
		&lt;ul class="tt-sns-service-default"&gt;
			&lt;li class="tt-sns-service-mypeople"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('mypeople', '', '');"&gt;마이피플&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-twitter"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('twitter', '', '');"&gt;트위터&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-facebook"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('facebook', '', '');"&gt;페이스북&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-other"&gt;&lt;a href="javascript:;" onmouseover="ShareEntryWithSNS.showLayer(event, '');" onmouseout="ShareEntryWithSNS.hideLayer(event, '');"&gt;더보기&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
		&lt;ul class="tt-sns-service-more" id="ttSnsServiceMore-" onmouseout="ShareEntryWithSNS.hideLayer(event, '');"&gt;
			&lt;li class="tt-sns-service-me2day"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('me2day', '', '');"&gt;미투데이&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-yozm"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('yozm', '', '');"&gt;요즘&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/div&gt;
	&lt;div class="tt-sns-clear"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style="text-align:right; padding-top:10px;"&gt;
&lt;iframe src="http://www.facebook.com/plugins/like.php?href=zfanta.com/472&amp;amp;layout=button_count&amp;amp;show_faces=true&amp;amp;width=90&amp;amp;action=like&amp;amp;font=tahoma&amp;amp;colorscheme=light&amp;amp;height=65" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:65px;" allowTransparency="true"&gt;&lt;/iframe&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/zfanta/~4/HLTM0RdFS9c" height="1" width="1"/&gt;</description>
			<category>뻘소리</category>
			<author>　환타</author>
			<guid isPermaLink="false">http://zfanta.com/472</guid>
			<comments>http://zfanta.com/entry/%EC%A0%95%EB%B4%89%ED%98%81%EC%9D%B4-%EC%A1%B0%EC%9C%A4%ED%9D%AC%EB%A5%BC-%EC%A2%8B%EC%95%84%ED%95%A9%EB%8B%88%EB%8B%A4#entry472comment</comments>
			<pubDate>Tue, 01 Mar 2011 10:45:48 +0900</pubDate>
		<feedburner:origLink>http://zfanta.com/472</feedburner:origLink></item>
		<item>
			<title>bigint 수정</title>
			<link>http://feedproxy.google.com/~r/zfanta/~3/B0Bja72PR3o/469</link>
			<description>&lt;textarea class="c" name="code" style="margin-left: 2px; margin-right: 2px; width: 696px; margin-top: 2px; margin-bottom: 2px; height: 631px; "&gt;
#include &lt;iostream&gt;
#include &lt;fstream&gt;
#include &lt;string&gt;  
#include &lt;stdlib.h&gt;
#include &lt;stdio.h&gt;
#include &lt;memory.h&gt;
#include &lt;time.h&gt;

#pragma warning(disable:4996)

class bigint
{
private:
	char sign;		//+:0, -:1					
	unsigned *dats;	//가장 뒷자리가 dats[0]에 저장
	unsigned len;	//dats배열 길이

public:
	unsigned cona2u(char*);

	bigint();
	~bigint();
	bigint(const int);
	bigint(const unsigned);
	bigint(const char*);
	bigint(const bigint &amp;);

	unsigned resize(unsigned);	//길이조절
	unsigned resize();			//앞의 0 지우기
	bigint abs();				//절대값
	bigint negative(unsigned);	//1의보수	

	int cmp(bigint &amp;b);			//strcmp와 리턴값 같음

	bigint _or(bigint &amp;b);		//this에 저장
	bigint _and(bigint &amp;b);		//this에 저장
	bigint _xor(bigint &amp;b);		//this에 저장
	bigint shr(unsigned n);		//this에 (this&gt;&gt;n)을 저장
	bigint shl(unsigned n);		//this에 (this&lt;&lt;n)을 저장	

	bigint add(bigint &amp;b);		//(this+b)를 리턴
	bigint sub(bigint &amp;b);		//(this-b)를 리턴
	bigint mul(bigint &amp;b);		//(this*b)를 리턴
	bigint div(bigint &amp;b, int);	//(this/b)또는 (this%b)리턴

	std::string conbcd();		//10진

	bigint operator=(const int);
	bigint operator=(const bigint &amp;);
	bigint operator=(const char*);

	friend bigint operator-(bigint);

	friend bigint operator|(bigint, bigint);
	friend bigint operator&amp;(bigint, bigint);
	friend bigint operator^(bigint, bigint);
	friend bigint operator+(bigint, bigint);
	friend bigint operator-(bigint, bigint);
	friend bigint operator*(bigint, bigint);
	friend bigint operator/(bigint, bigint);
	friend bigint operator%(bigint, bigint);
	friend bigint operator&lt;&lt;(bigint, bigint);
	friend bigint operator&gt;&gt;(bigint, bigint);

	friend bool operator&lt;(bigint, bigint);
	friend bool operator&lt;=(bigint, bigint);
	friend bool operator&gt;(bigint, bigint);
	friend bool operator&gt;=(bigint, bigint);
	friend bool operator==(bigint, bigint);
	friend bool operator!=(bigint, bigint);

	bigint operator|=(bigint);
	bigint operator&amp;=(bigint);
	bigint operator^=(bigint);
	bigint operator+=(bigint);
	bigint operator-=(bigint);
	bigint operator*=(bigint);
	bigint operator/=(bigint);
	bigint operator%=(bigint);
	bigint operator&lt;&lt;=(bigint);
	bigint operator&gt;&gt;=(bigint);

	bigint operator++();
	bigint operator++(int dummy);
	bigint operator--();
	bigint operator--(int dummy);

	friend std::ostream&amp; operator &lt;&lt;( std::ostream&amp; os, bigint&amp; b );
	friend std::istream&amp; operator &gt;&gt;( std::istream&amp; is, bigint&amp; b );
};

unsigned bigint::cona2u(char *src)
{
	unsigned ten, sum, eos=strlen(src)-1;

	for(sum=0, ten=1; (int)eos&gt;=0 &amp;&amp; ten&lt;=100000000; ten*=10, eos--)
	{
		sum+=ten*(src[eos]-'0');
		src[eos]=0;
	}
	return sum;
}

bigint::bigint()
{
	len=1;
	sign=0;
	dats=(unsigned*)calloc(1,sizeof(unsigned));
}

bigint::~bigint()
{
	free(dats);
}

bigint::bigint(const int src)
{
	len=1;
	dats=(unsigned*)malloc(sizeof(unsigned)*len);
	if(src&lt;0)
	{
		sign=1;
		dats[0]=-src;
	}
	else
	{
		sign=0;
		dats[0]=src;
	}
}

bigint::bigint(const char *src)
{
	char *str=(char*)malloc(sizeof(char)*(strlen(src)+1));

	sign=0;
	strcpy(str, src);
	if(src[0]=='-')
		strcpy(str,src+1), sign=1;
	if(src[0]=='+')
		strcpy(str,src+1);

	len=(strlen(src)-1)/9 + 1;
	dats=(unsigned*)malloc(sizeof(unsigned)*len);
	unsigned i;
	for(i=0; i&lt;len; i++)
	{
		dats[i]=cona2u(str);
	}
	free(str);
	shl(len*32);

	unsigned j, lmt=len/2;
	for(i=(len/2)*32; i; i--)
	{
		shr(1);
		for(j=len-1; j&gt;=lmt; j--)
		{
			if(dats[j]&gt;=2147483648)
				dats[j]-=1647483648;
		}
	}
}

bigint::bigint(const bigint &amp;src)
{
	len=src.len;
	sign=src.sign;
	dats=(unsigned*)malloc(sizeof(unsigned)*len);
	memcpy(dats, src.dats, sizeof(unsigned)*len);
}

unsigned bigint::resize(unsigned len_new)
{
	if(len==len_new)
		return len;
	unsigned *new_p=(unsigned*)malloc(sizeof(unsigned)*len_new);		//
	memcpy(new_p, dats, sizeof(unsigned)*((len&lt;len_new)?len:len_new));	//이부분에 realloc(dats, sizeof(unsigned)*len_new)쓰면 왜 값이 바뀌나요
	free(dats);															//
	dats=new_p;															//

	if(len &lt; len_new)
		memset(dats+len, 0, sizeof(unsigned)*(len_new-len));
	len=len_new;
	return len;
}

unsigned bigint::resize()
{
	unsigned i;
	for(i=len-1; dats[i]==0; i--);
	i++;
	if(i)
		resize(i);
	else
		resize(1);
	return len;
}

bigint bigint::abs()
{
	bigint toreturn(*this);
	toreturn.sign=0;
	return toreturn;
}

//1의 보수
bigint bigint::negative(unsigned len_new)
{
	bigint toreturn(*this);
	toreturn.resize(len_new);
	for(unsigned i=0; i&lt;len_new; i++)
		toreturn.dats[i]=~toreturn.dats[i];
	return toreturn;
}

int bigint::cmp(bigint &amp;b)
{
	if(len==1 &amp;&amp; b.len==1 &amp;&amp; dats[0]==0 &amp;&amp; b.dats[0]==0)
		return 0;
	if(sign==1 &amp;&amp; b.sign==0)
		return -1;
	if(sign==0 &amp;&amp; b.sign==1)
		return 1;

	int left=1, right=-1;	
	if(sign==1 &amp;&amp; b.sign==1)
		left=-1, right=1;

	if(len&gt;b.len)
		return left;
	if(len&lt;b.len)
		return right;

	for(int i=len-1; i&gt;=0; i--)
	{
		if(dats[i]&gt;b.dats[i])
			return left;
		if(dats[i]&lt;b.dats[i])
			return right;
	}
	return 0;
}

bigint bigint::_or(bigint &amp;b)
{
	if(len&lt;b.len)
		resize(b.len);
	unsigned i;
	for(i=0; i&lt;b.len; i++)
		dats[i]|=b.dats[i];
	return *this;
}

bigint bigint::_and(bigint &amp;b)
{
	if(len&lt;b.len)
		resize(b.len);
	unsigned i;
	for(i=0; i&lt;b.len; i++)
		dats[i]&amp;=b.dats[i];
	return *this;
}

bigint bigint::_xor(bigint &amp;b)
{
	if(len&lt;b.len)
		resize(b.len);
	unsigned i;
	for(i=0; i&lt;b.len; i++)
		dats[i]^=b.dats[i];
	return *this;
}

bigint bigint::shr(unsigned n)
{
	unsigned move=n&gt;&gt;5, cut=n&amp;31, i, j, tmp;
	dats[0]=dats[move]&gt;&gt;cut;
	for(i=1; i&lt;len-move; i++)
	{
		for(j=0, tmp=dats[i+move]; j&lt;32-cut; j++)	//dats[i+1]=dats[i+1]|(dats[i+move]&lt;&lt;(32-cut));
			tmp&lt;&lt;=1;								//
		dats[i-1]|=tmp;
		dats[i]=dats[i+move]&gt;&gt;cut;  
	}


	resize(len-move);//옮겨진 부분 삭제
	resize();
	return *this;
}

bigint bigint::shl(unsigned n)
{
	unsigned move=n&gt;&gt;5, cut=n&amp;31, i, j, tmp;

	resize(len+move+1);
	dats[len-1]=dats[len-move-1]&lt;&lt;cut;
	for(i=len-2; (int)i&gt;=(int)move; i--)
	{
		for(j=0, tmp=dats[i-move]; j&lt;32-cut; j++)	//dats[i+1]=dats[i+1]|(dats[i-move]&gt;&gt;(32-cut));
			tmp&gt;&gt;=1;								//
		dats[i+1]=dats[i+1]|tmp;					//
		dats[i]=dats[i-move]&lt;&lt;cut;
	}
	memset(dats, 0, sizeof(unsigned)*move);//뒤에 옮겨진 부분 0으로

	resize();
	return *this;
}

bigint bigint::add(bigint &amp;b)
{
	bigint toreturn=*this;
	long long carry=0;
	unsigned i;
	toreturn.resize( ((b.len&gt;toreturn.len)?b.len:toreturn.len) + 1 );

	for(i=0; i&lt;b.len; i++)
	{
		carry = (long long)toreturn.dats[i] + (long long)b.dats[i] + carry;
		toreturn.dats[i]=carry&amp;(((long long)1&lt;&lt;32)-1);
		carry&gt;&gt;=32;
	}

	for(; carry; i++)
	{
		carry=(long long)toreturn.dats[i] + carry;
		toreturn.dats[i]=carry&amp;(((long long)1&lt;&lt;32)-1);
		carry&gt;&gt;=32;
	}

	toreturn.resize();

	return toreturn;
}

//1의 보수 사용
bigint bigint::sub(bigint &amp;b)
{
	bigint toreturn(*this);
	bigint subtrahend(b);	//감수

	unsigned len_new=((toreturn.len&gt;b.len)?toreturn.len:b.len);
	subtrahend=subtrahend.negative(len_new);

	toreturn=toreturn.add(subtrahend);
	if(toreturn.len &gt; len_new)//자리올림수있으면
	{
		toreturn.resize(len_new);
		toreturn=toreturn.add((bigint)1);
	}
	else//자리올림수 없으면
	{
		toreturn=toreturn.negative(len_new);
		toreturn.sign=1;
	}
	return toreturn;
}

bigint bigint::mul(bigint &amp;b)
{
	bigint result, tmp;
	unsigned i, j;
	unsigned long long carry;
	for(i=0; i&lt;b.len; i++)
	{
		tmp.resize(len+1+i);
		for(carry=j=0; j&lt;len; j++)
		{
			carry=(long long)dats[j]*(long long)b.dats[i]+carry;
			tmp.dats[j+i]=(unsigned)carry&amp;(((long long)1&lt;&lt;32)-1);
			carry&gt;&gt;=32;
		}
		tmp.dats[j+i]=(unsigned)carry;
		result=result.add(tmp);
		memset(tmp.dats, 0, sizeof(unsigned)*tmp.len);
	}
	result.resize();
	return result;	
}

bigint bigint::div(bigint &amp;b, int ask_mod=0)
{
	bigint r=abs(), q=0, divisor=b.abs(), one=1;
	unsigned i;

	for(i=0;divisor.cmp(r)&lt;=0;divisor.shl(1),i++);
	i--;
	if((int)i&gt;=0)
	{
		one.shl(i);
		divisor.shr(1);

		while(b.cmp(r)&lt;=0)//b&lt;=r
		{
			for(;divisor.cmp(r)&gt;0;divisor.shr(1),one.shr(1));
			q._or(one);
			r=r.sub(divisor);
		}
	}

	if(ask_mod)
		return r;
	return q;
}

std::string bigint::conbcd()
{
	unsigned *bcd, len_new, head, i, j;
	char  str_tmp[10];
	std::string result;

	len_new=10704*len/10000+1+len;

	bcd=(unsigned*)calloc(len_new, sizeof(unsigned));
	memcpy(bcd, dats, sizeof(unsigned)*len);

	for(head=len, i=0; i&lt;32*len; i++)
	{
		for(j=head; j&gt;=len; j--)
		{
			if(bcd[j]&gt;=500000000)
				bcd[j]+=1647483648;
		}
		if(bcd[head]&gt;&gt;31)
			head++;
		bcd[head]&lt;&lt;=1;
		for(j=head-1; (int)j&gt;=0; j--)
		{
			bcd[j+1]|=(bcd[j]&gt;&gt;31);
			bcd[j]&lt;&lt;=1;
		}		
	}

	for(i=len_new-1; bcd[i]==0; i--);

	if((int)i&lt;0)
	{
		result="0";
		return result;
	}

	sprintf(str_tmp, "%u", bcd[i]);
	result.insert(result.size(), str_tmp);

	for(--i; (int)i&gt;=len; i--)
	{
		sprintf(str_tmp, "%09u", bcd[i]);
		result.insert(result.size(), str_tmp);
	}

	free(bcd);
	return result;
}

bigint bigint::operator=(const int src)
{
	resize(1);
	sign=0;	
	dats[0]=src;
	if(src&lt;0)
		sign=1, dats[0]*=-1;
	return *this;
}

bigint bigint::operator=(const bigint &amp;src)
{
	resize(src.len);
	sign=src.sign;
	memcpy(dats, src.dats, sizeof(unsigned)*len);
	return *this;
}

bigint bigint::operator=(const char *src)
{
	char *str=(char*)malloc(sizeof(char)*(strlen(src)+1));

	sign=0;
	strcpy(str, src);
	if(src[0]=='-')
		strcpy(str,src+1), sign=1;
	if(src[0]=='+')
		strcpy(str,src+1);

	resize((strlen(src)-1)/9 + 1);
	unsigned i;
	for(i=0; i&lt;len; i++)
	{
		dats[i]=cona2u(str);
	}
	free(str);
	shl(len*32);

	unsigned j, lmt=len/2;
	for(i=(len/2)*32; i; i--)
	{
		shr(1);
		for(j=len-1; j&gt;=lmt; j--)
		{
			if(dats[j]&gt;=2147483648)
				dats[j]-=1647483648;
		}
	}

	return *this;
}

bigint operator-(bigint a)
{
	a.sign^=1;
	return a;
}

bigint operator|(bigint a, bigint b)
{
	return a._or(b);
}

bigint operator&amp;(bigint a, bigint b)
{
	return a._and(b);
}

bigint operator^(bigint a, bigint b)
{
	return a._xor(b);
}

bigint operator+(bigint a, bigint b)
{
	if(a.sign==b.sign)
		return a.add(b);
	if(a.sign==0 &amp;&amp; b.sign==1)
		return a.sub(b);
	//a.sign==1 &amp;&amp; b.sign==0
	return b.sub(a);
}

bigint operator-(bigint a, bigint b)
{
	if(a.sign==1 &amp;&amp; b.sign==1)
	{
		b.sign=0;
		if((a.abs()).cmp(b.abs())==1)
			b.sign=1;
		b=b.sub(a);
		return b;
	}
	if(a.sign==0 &amp;&amp; b.sign==0)
		return a.sub(b);
	if(a.sign==0 &amp;&amp; b.sign==1)
		return a.add(b);
	//a.sign==1 &amp;&amp; b.sign==0
	a=a.add(b);
	a.sign=1;
	return a;
}

bigint operator*(bigint a, bigint b)
{
	bigint toreturn=a.mul(b);
	toreturn.sign=a.sign^b.sign;
	return toreturn;
}

bigint operator/(bigint a, bigint b)
{
	bigint toreturn=a.abs().div(b.abs());
	toreturn.sign=a.sign^b.sign;
	return toreturn;
}

bigint operator%(bigint a, bigint b)
{
	bigint toreturn=a.abs().div(b.abs(),1);
	toreturn.sign=a.sign;
	return toreturn;
}

bigint operator&lt;&lt;(bigint a, bigint b)
{
	bigint tmp(2147483647);
	while(b.len&gt;1)
	{
		a.shl(2147483647);
		b=b.sub(tmp);
	}
	a.shl(b.dats[0]);
	return a;
}

bigint operator&gt;&gt;(bigint a, bigint b)
{
	bigint tmp(2147483647);
	while(b.len&gt;1)
	{
		a.shr(2147483647);
		b=b.sub(tmp);
	}
	a.shr(b.dats[0]);
	return a;
}

bool operator&lt;(bigint a, bigint b)
{
	if(a.cmp(b)&lt;0)
		return true;
	return false;
}

bool operator&lt;=(bigint a, bigint b)
{
	if(a.cmp(b)&lt;=0)
		return true;
	return false;
}

bool operator&gt;(bigint a, bigint b)
{
	if(a.cmp(b)&gt;0)
		return true;
	return false;
}

bool operator&gt;=(bigint a, bigint b)
{
	if(a.cmp(b)&gt;=0)
		return true;
	return false;
}

bool operator==(bigint a, bigint b)
{
	if(a.cmp(b)==0)
		return true;
	return false;
}

bool operator!=(bigint a, bigint b)
{
	if(a.cmp(b)==0)
		return false;
	return true;
}

bigint bigint::operator|=(bigint b)
{
	*this=*this|b;
	return *this;
}

bigint bigint::operator&amp;=(bigint b)
{
	*this=*this&amp;b;
	return *this;
}
bigint bigint::operator^=(bigint b)
{
	*this=*this^b;
	return *this;
}

bigint bigint::operator+=(bigint b)
{
	*this=*this+b;
	return *this;
}

bigint bigint::operator-=(bigint b)
{
	*this=*this-b;
	return *this;
}

bigint bigint::operator*=(bigint b)
{
	*this=*this*b;
	return *this;
}

bigint bigint::operator/=(bigint b)
{
	*this=*this/b;
	return *this;
}

bigint bigint::operator%=(bigint b)
{
	*this=*this%b;
	return *this;
}

bigint bigint::operator&lt;&lt;=(bigint b)
{
	*this=*this&lt;&lt;b;
	return *this;
}

bigint bigint::operator&gt;&gt;=(bigint b)
{
	*this=*this&gt;&gt;b;
	return *this;
}

bigint bigint::operator++()
{
	*this+=1;
	return *this;
}

bigint bigint::operator++(int dummy)
{
	bigint old(*this);
	*this+=1;
	return old;
}

bigint bigint::operator--()
{
	*this-=1;
	return *this;
}

bigint bigint::operator--(int dummy)
{
	bigint old(*this);
	*this-=1;
	return old;
}

std::ostream&amp; operator&lt;&lt;(std::ostream&amp; os, bigint&amp; b)
{
	os&lt;&lt;((b.sign)?"-":"")&lt;&lt;b.conbcd();

	return os;
}

std::istream&amp; operator&gt;&gt;(std::istream&amp; is, bigint&amp; b)
{
	std::string numstr;
	is&gt;&gt;numstr;
	b=numstr.c_str();

	return is;
}

bigint fac(bigint n)  
{
	bigint result=1;
	for(; n&gt;0; n--)
		result*=n;

	return result;
}

int main()
{
	clock_t start, end;
	std::ofstream fout;
	fout.open("result.txt");

	bigint n=1;

	std::cout&lt;&lt;"&gt;";
	std::cin&gt;&gt;n;
	while(n&gt;0)
	{
		start=clock();

		fout&lt;&lt;n&lt;&lt;"!:\n";
		fout&lt;&lt;fac(n)&lt;&lt;'\n';

		end=clock();
		fout&lt;&lt;(double)(end-start) / CLOCKS_PER_SEC&lt;&lt;"sec\n";

		std::cout&lt;&lt;"&gt;";
		std::cin&gt;&gt;n;
	}

	return 0;
}
&lt;/textarea&gt;&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;
나눗셈에 오류가 있었습니다.&lt;/div&gt;
&lt;div&gt;bcd도 고쳤고&lt;/div&gt;&lt;div class="entry-ccl" style="clear: both; text-align: right; margin-bottom: 10px"&gt;
	&lt;img id="ccl-icon-469-0" class="entry-ccl-by" src="http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black01.png" alt="저작자 표시"/&gt;
	&lt;img id="ccl-icon-469-1" class="entry-ccl-nc" src="http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black02.png" alt="비영리"/&gt;
	&lt;img id="ccl-icon-469-2" class="entry-ccl-nd" src="http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black03.png" alt="변경 금지"/&gt;
	&lt;!--
	&lt;rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"&gt;
		&lt;Work rdf:about=""&gt;
			&lt;license rdf:resource="http://creativecommons.org/licenses/by-nc-nd/2.0/kr/" /&gt;
		&lt;/Work&gt;
		&lt;License rdf:about="http://creativecommons.org/licenses/by-nc-nd/"&gt;
			&lt;permits rdf:resource="http://web.resource.org/cc/Reproduction"/&gt;
			&lt;permits rdf:resource="http://web.resource.org/cc/Distribution"/&gt;
			&lt;requires rdf:resource="http://web.resource.org/cc/Notice"/&gt;
			&lt;requires rdf:resource="http://web.resource.org/cc/Attribution"/&gt;
			&lt;prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/&gt;
		&lt;/License&gt;
	&lt;/rdf:RDF&gt;
	--&gt;
&lt;/div&gt;
&lt;div class="tt-plugin tt-share-entry-with-sns tt-sns-icon-alignment-right tt-sns-icon-size-small"&gt;
	&lt;div class="tt-sns-wrap" id="ttSnsWrap-"&gt;
		&lt;ul class="tt-sns-service-default"&gt;
			&lt;li class="tt-sns-service-mypeople"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('mypeople', '', '');"&gt;마이피플&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-twitter"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('twitter', '', '');"&gt;트위터&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-facebook"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('facebook', '', '');"&gt;페이스북&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-other"&gt;&lt;a href="javascript:;" onmouseover="ShareEntryWithSNS.showLayer(event, '');" onmouseout="ShareEntryWithSNS.hideLayer(event, '');"&gt;더보기&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
		&lt;ul class="tt-sns-service-more" id="ttSnsServiceMore-" onmouseout="ShareEntryWithSNS.hideLayer(event, '');"&gt;
			&lt;li class="tt-sns-service-me2day"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('me2day', '', '');"&gt;미투데이&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-yozm"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('yozm', '', '');"&gt;요즘&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/div&gt;
	&lt;div class="tt-sns-clear"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style="text-align:right; padding-top:10px;"&gt;
&lt;iframe src="http://www.facebook.com/plugins/like.php?href=zfanta.com/469&amp;amp;layout=button_count&amp;amp;show_faces=true&amp;amp;width=90&amp;amp;action=like&amp;amp;font=tahoma&amp;amp;colorscheme=light&amp;amp;height=65" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:65px;" allowTransparency="true"&gt;&lt;/iframe&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/zfanta/~4/B0Bja72PR3o" height="1" width="1"/&gt;</description>
			<category>bigint</category>
			<category>bigint</category>
			<author>　환타</author>
			<guid isPermaLink="false">http://zfanta.com/469</guid>
			<comments>http://zfanta.com/entry/bigint-%EC%88%98%EC%A0%95#entry469comment</comments>
			<pubDate>Mon, 01 Feb 2010 18:34:14 +0900</pubDate>
		<feedburner:origLink>http://zfanta.com/469</feedburner:origLink></item>
		<item>
			<title>c++ bigint class완성</title>
			<link>http://feedproxy.google.com/~r/zfanta/~3/i05zQ1l_brE/459</link>
			<description>&lt;div&gt;
&lt;font class="Apple-style-span" color="#000000" face="-webkit-monospace" size="3"&gt;&lt;span class="Apple-style-span" style="font-size: 13px; line-height: normal;"&gt;적분형님따라 만든 bigint&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;textarea class="c" name="code" style="margin-left: 0px; margin-right: 0px; width: 714px; margin-top: 1px; margin-bottom: 1px; height: 12101px; "&gt;
#include &lt;iostream&gt;
#include &lt;fstream&gt;
#include &lt;string&gt;  
#include &lt;stdlib.h&gt;
#include &lt;stdio.h&gt;
#include &lt;memory.h&gt;
#include &lt;time.h&gt;

#pragma warning(disable:4996)

class bigint
{
private:
	char sign;		//+:0, -:1					
	unsigned *dats;	//가장 뒷자리가 dats[0]에 저장
	unsigned len;	//dats배열 길이

public:
	unsigned cona2u(char*);

	bigint();
	~bigint();
	bigint(const int);
	bigint(const unsigned);
	bigint(const char*);
	bigint(const bigint &amp;);

	unsigned resize(unsigned);	//길이조절
	unsigned resize();			//앞의 0 지우기
	bigint abs();				//절대값
	bigint negative(unsigned);	//1의보수	

	int cmp(bigint &amp;b);			//strcmp와 리턴값 같음

	bigint _or(bigint &amp;b);		//this에 저장
	bigint _and(bigint &amp;b);		//this에 저장
	bigint _xor(bigint &amp;b);		//this에 저장
	bigint shr(unsigned n);		//this에 (this&gt;&gt;n)을 저장
	bigint shl(unsigned n);		//this에 (this&lt;&lt;n)을 저장	

	bigint add(bigint &amp;b);		//(this+b)를 리턴
	bigint sub(bigint &amp;b);		//(this-b)를 리턴
	bigint mul(bigint &amp;b);		//(this*b)를 리턴
	bigint div(bigint &amp;b, int);	//(this/b)또는 (this%b)리턴

	std::string conbcd();		//10진

	bigint operator=(const int);
	bigint operator=(const bigint &amp;);
	bigint operator=(const char*);

	friend bigint operator-(bigint);

	friend bigint operator|(bigint, bigint);
	friend bigint operator&amp;(bigint, bigint);
	friend bigint operator^(bigint, bigint);
	friend bigint operator+(bigint, bigint);
	friend bigint operator-(bigint, bigint);
	friend bigint operator*(bigint, bigint);
	friend bigint operator/(bigint, bigint);
	friend bigint operator%(bigint, bigint);
	friend bigint operator&lt;&lt;(bigint, bigint);
	friend bigint operator&gt;&gt;(bigint, bigint);

	friend bool operator&lt;(bigint, bigint);
	friend bool operator&lt;=(bigint, bigint);
	friend bool operator&gt;(bigint, bigint);
	friend bool operator&gt;=(bigint, bigint);
	friend bool operator==(bigint, bigint);
	friend bool operator!=(bigint, bigint);

	bigint operator|=(bigint);
	bigint operator&amp;=(bigint);
	bigint operator^=(bigint);
	bigint operator+=(bigint);
	bigint operator-=(bigint);
	bigint operator*=(bigint);
	bigint operator/=(bigint);
	bigint operator%=(bigint);
	bigint operator&lt;&lt;=(bigint);
	bigint operator&gt;&gt;=(bigint);

	bigint operator++();
	bigint operator++(int dummy);
	bigint operator--();
	bigint operator--(int dummy);

	friend std::ostream&amp; operator &lt;&lt;( std::ostream&amp; os, bigint&amp; b );
	friend std::istream&amp; operator &gt;&gt;( std::istream&amp; is, bigint&amp; b );
};

unsigned bigint::cona2u(char *src)
{
	unsigned ten, sum, eos=strlen(src)-1;

	for(sum=0, ten=1; (int)eos&gt;=0 &amp;&amp; ten&lt;=100000000; ten*=10, eos--)
	{
		sum+=ten*(src[eos]-'0');
		src[eos]=0;
	}
	return sum;
}

bigint::bigint()
{
	len=1;
	sign=0;
	dats=(unsigned*)calloc(1,sizeof(unsigned));
}

bigint::~bigint()
{
	free(dats);
}

bigint::bigint(const int src)
{
	len=1;
	sign=0;
	dats=(unsigned*)malloc(sizeof(unsigned)*len);
	dats[0]=src;
}

bigint::bigint(const char *src)
{
	char *str=(char*)malloc(sizeof(char)*(strlen(src)+1));

	sign=0;
	strcpy(str, src);
	if(src[0]=='-')
		strcpy(str,src+1), sign=1;
	if(src[0]=='+')
		strcpy(str,src+1);

	len=(strlen(src)-1)/9 + 1;
	dats=(unsigned*)malloc(sizeof(unsigned)*len);
	unsigned i;
	for(i=0; i&lt;len; i++)
	{
		dats[i]=cona2u(str);
	}
	free(str);
	shl(len*32);

	unsigned j, lmt=len/2;
	for(i=(len/2)*32; i; i--)
	{
		shr(1);
		for(j=len-1; j&gt;=lmt; j--)
		{
			if(dats[j]&gt;=2147483648)
				dats[j]-=1647483648;
		}
	}
}

bigint::bigint(const bigint &amp;src)
{
	len=src.len;
	sign=src.sign;
	dats=(unsigned*)malloc(sizeof(unsigned)*len);
	memcpy(dats, src.dats, sizeof(unsigned)*len);
}

unsigned bigint::resize(unsigned len_new)
{
	if(len==len_new)
		return len;
	unsigned *new_p=(unsigned*)malloc(sizeof(unsigned)*len_new);		//
	memcpy(new_p, dats, sizeof(unsigned)*((len&lt;len_new)?len:len_new));	//이부분에 realloc(dats, sizeof(unsigned)*len_new)쓰면 왜 값이 바뀌나요
	free(dats);															//
	dats=new_p;															//

	if(len &lt; len_new)
		memset(dats+len, 0, sizeof(unsigned)*(len_new-len));
	len=len_new;
	return len;
}

unsigned bigint::resize()
{
	unsigned i;
	for(i=len-1; dats[i]==0; i--);
	i++;
	if(i)
		resize(i);
	else
		resize(1);
	return len;
}

bigint bigint::abs()
{
	bigint toreturn(*this);
	toreturn.sign=0;
	return toreturn;
}

//1의 보수
bigint bigint::negative(unsigned len_new)
{
	bigint toreturn(*this);
	toreturn.resize(len_new);
	for(unsigned i=0; i&lt;len_new; i++)
		toreturn.dats[i]=~toreturn.dats[i];
	return toreturn;
}

int bigint::cmp(bigint &amp;b)
{
	if(len==1 &amp;&amp; b.len==1 &amp;&amp; dats[0]==0 &amp;&amp; b.dats[0]==0)
		return 0;
	if(sign==1 &amp;&amp; b.sign==0)
		return -1;
	if(sign==0 &amp;&amp; b.sign==1)
		return 1;

	int left=1, right=-1;	
	if(sign==1 &amp;&amp; b.sign==1)
		left=-1, right=1;

	if(len&gt;b.len)
		return left;
	if(len&lt;b.len)
		return right;

	for(int i=len-1; i&gt;=0; i--)
	{
		if(dats[i]&gt;b.dats[i])
			return left;
		if(dats[i]&lt;b.dats[i])
			return right;
	}
	return 0;
}

bigint bigint::_or(bigint &amp;b)
{
	if(len&lt;b.len)
		resize(b.len);
	unsigned i;
	for(i=0; i&lt;b.len; i++)
		dats[i]|=b.dats[i];
	return *this;
}

bigint bigint::_and(bigint &amp;b)
{
	if(len&lt;b.len)
		resize(b.len);
	unsigned i;
	for(i=0; i&lt;b.len; i++)
		dats[i]&amp;=b.dats[i];
	return *this;
}

bigint bigint::_xor(bigint &amp;b)
{
	if(len&lt;b.len)
		resize(b.len);
	unsigned i;
	for(i=0; i&lt;b.len; i++)
		dats[i]^=b.dats[i];
	return *this;
}

bigint bigint::shr(unsigned n)
{
	unsigned move=n&gt;&gt;5, cut=n&amp;31, i, j, tmp;
	dats[0]=dats[move]&gt;&gt;cut;
	for(i=1; i&lt;len-move; i++)
	{
		for(j=0, tmp=dats[i+move]; j&lt;32-cut; j++)	//dats[i+1]=dats[i+1]|(dats[i+move]&lt;&lt;(32-cut));
			tmp&lt;&lt;=1;								//
		dats[i-1]|=tmp;
		dats[i]=dats[i+move]&gt;&gt;cut;  
	}


	resize(len-move);//옮겨진 부분 삭제
	resize();
	return *this;
}

bigint bigint::shl(unsigned n)
{
	unsigned move=n&gt;&gt;5, cut=n&amp;31, i, j, tmp;

	resize(len+move+1);
	dats[len-1]=dats[len-move-1]&lt;&lt;cut;
	for(i=len-2; (int)i&gt;=(int)move; i--)
	{
		for(j=0, tmp=dats[i-move]; j&lt;32-cut; j++)	//dats[i+1]=dats[i+1]|(dats[i-move]&gt;&gt;(32-cut));
			tmp&gt;&gt;=1;								//
		dats[i+1]=dats[i+1]|tmp;					//
		dats[i]=dats[i-move]&lt;&lt;cut;
	}
	memset(dats, 0, sizeof(unsigned)*move);//뒤에 옮겨진 부분 0으로

	resize();
	return *this;
}

bigint bigint::add(bigint &amp;b)
{
	bigint toreturn=*this;
	long long carry=0;
	unsigned i;
	toreturn.resize( ((b.len&gt;toreturn.len)?b.len:toreturn.len) + 1 );

	for(i=0; i&lt;b.len; i++)
	{
		carry = (long long)toreturn.dats[i] + (long long)b.dats[i] + carry;
		toreturn.dats[i]=carry&amp;(((long long)1&lt;&lt;32)-1);
		carry&gt;&gt;=32;
	}

	for(; carry; i++)
	{
		carry=(long long)toreturn.dats[i] + carry;
		toreturn.dats[i]=carry&amp;(((long long)1&lt;&lt;32)-1);
		carry&gt;&gt;=32;
	}

	toreturn.resize();

	return toreturn;
}

//1의 보수 사용
bigint bigint::sub(bigint &amp;b)
{
	bigint toreturn(*this);
	bigint subtrahend(b);	//감수

	unsigned len_new=((toreturn.len&gt;b.len)?toreturn.len:b.len);
	subtrahend=subtrahend.negative(len_new);

	toreturn=toreturn.add(subtrahend);
	if(toreturn.len &gt; len_new)//자리올림수있으면
	{
		toreturn.resize(len_new);
		toreturn=toreturn.add((bigint)1);
	}
	else//자리올림수 없으면
	{
		toreturn=toreturn.negative(len_new);
		toreturn.sign=1;
	}
	return toreturn;
}

bigint bigint::mul(bigint &amp;b)
{
	bigint result, tmp;
	unsigned i, j;
	unsigned long long carry;
	for(i=0; i&lt;b.len; i++)
	{
		tmp.resize(len+1+i);
		for(carry=j=0; j&lt;len; j++)
		{
			carry=(long long)dats[j]*(long long)b.dats[i]+carry;
			tmp.dats[j+i]=(unsigned)carry&amp;(((long long)1&lt;&lt;32)-1);
			carry&gt;&gt;=32;
		}
		tmp.dats[j+i]=(unsigned)carry;
		result=result.add(tmp);
		memset(tmp.dats, 0, sizeof(unsigned)*tmp.len);
	}
	result.resize();
	return result;	
}

bigint bigint::div(bigint &amp;b, int ask_mod=0)
{
	bigint r=abs(), q=0, divisor=b.abs(), one=1;
	unsigned i;

	for(i=0;divisor.cmp(r)&lt;=0;divisor.shl(1),i++);
	i--;
	if((int)i&gt;0)
	{
		one.shl(i);
		divisor.shr(1);

		while(b.cmp(r)&lt;=0)//b&lt;=r
		{
			for(;divisor.cmp(r)&gt;0;divisor.shr(1),one.shr(1));
			q._or(one);
			r=r.sub(divisor);
		}
	}

	if(ask_mod)
		return r;
	return q;
}

std::string bigint::conbcd()
{
	unsigned *bcd, len_new, head, i, j;
	char  str_tmp[10];
	std::string result;

	len_new=10704*len/10000+1+len;

	bcd=(unsigned*)calloc(len_new, sizeof(unsigned));
	memcpy(bcd, dats, sizeof(unsigned)*len);

	for(head=len, i=0; i&lt;32*len; i++)
	{
		for(j=head; j&gt;=len; j--)
		{
			if(bcd[j]&gt;=500000000)
				bcd[j]+=1647483648;
		}
		if(bcd[head]&gt;&gt;31)
			head++;
		bcd[head]&lt;&lt;=1;
		for(j=head-1; (int)j&gt;=0; j--)
		{
			bcd[j+1]|=(bcd[j]&gt;&gt;31);
			bcd[j]&lt;&lt;=1;
		}		
	}

	for(i=len_new-1; bcd[i]==0; i--);

	sprintf(str_tmp, "%u", bcd[i]);
	result.insert(result.size(), str_tmp);

	for(--i; i&gt;=len; i--)
	{
		sprintf(str_tmp, "%09u", bcd[i]);
		result.insert(result.size(), str_tmp);
	}

	free(bcd);
	return result;
}

bigint bigint::operator=(const int src)
{
	resize(1);
	sign=0;	
	dats[0]=src;
	if(src&lt;0)
		sign=1, dats[0]*=-1;
	return *this;
}

bigint bigint::operator=(const bigint &amp;src)
{
	resize(src.len);
	sign=src.sign;
	memcpy(dats, src.dats, sizeof(unsigned)*len);
	return *this;
}

bigint bigint::operator=(const char *src)
{
	char *str=(char*)malloc(sizeof(char)*(strlen(src)+1));

	sign=0;
	strcpy(str, src);
	if(src[0]=='-')
		strcpy(str,src+1), sign=1;
	if(src[0]=='+')
		strcpy(str,src+1);

	resize((strlen(src)-1)/9 + 1);
	unsigned i;
	for(i=0; i&lt;len; i++)
	{
		dats[i]=cona2u(str);
	}
	free(str);
	shl(len*32);

	unsigned j, lmt=len/2;
	for(i=(len/2)*32; i; i--)
	{
		shr(1);
		for(j=len-1; j&gt;=lmt; j--)
		{
			if(dats[j]&gt;=2147483648)
				dats[j]-=1647483648;
		}
	}

	return *this;
}

bigint operator-(bigint a)
{
	a.sign^=1;
	return a;
}

bigint operator|(bigint a, bigint b)
{
	return a._or(b);
}

bigint operator&amp;(bigint a, bigint b)
{
	return a._and(b);
}

bigint operator^(bigint a, bigint b)
{
	return a._xor(b);
}

bigint operator+(bigint a, bigint b)
{
	if(a.sign==b.sign)
		return a.add(b);
	if(a.sign==0 &amp;&amp; b.sign==1)
		return a.sub(b);
	//a.sign==1 &amp;&amp; b.sign==0
	return b.sub(a);
}

bigint operator-(bigint a, bigint b)
{
	if(a.sign==1 &amp;&amp; b.sign==1)
	{
		b.sign=0;
		if((a.abs()).cmp(b.abs())==1)
			b.sign=1;
		b=b.sub(a);
		return b;
	}
	if(a.sign==0 &amp;&amp; b.sign==0)
		return a.sub(b);
	if(a.sign==0 &amp;&amp; b.sign==1)
		return a.add(b);
	//a.sign==1 &amp;&amp; b.sign==0
	a=a.add(b);
	a.sign=1;
	return a;
}

bigint operator*(bigint a, bigint b)
{
	bigint toreturn=a.mul(b);
	toreturn.sign=a.sign^b.sign;
	return toreturn;
}

bigint operator/(bigint a, bigint b)
{
	bigint toreturn=a.div(b);
	toreturn.sign=a.sign^b.sign;
	return toreturn;
}

bigint operator%(bigint a, bigint b)
{
	bigint toreturn=a.div(b,1);
	toreturn.sign=a.sign;
	return toreturn;
}

bigint operator&lt;&lt;(bigint a, bigint b)
{
	bigint tmp(2147483647);
	while(b.len&gt;1)
	{
		a.shl(2147483647);
		b=b.sub(tmp);
	}
	a.shl(b.dats[0]);
	return a;
}

bigint operator&gt;&gt;(bigint a, bigint b)
{
	bigint tmp(2147483647);
	while(b.len&gt;1)
	{
		a.shr(2147483647);
		b=b.sub(tmp);
	}
	a.shr(b.dats[0]);
	return a;
}

bool operator&lt;(bigint a, bigint b)
{
	if(a.cmp(b)&lt;0)
		return true;
	return false;
}

bool operator&lt;=(bigint a, bigint b)
{
	if(a.cmp(b)&lt;=0)
		return true;
	return false;
}

bool operator&gt;(bigint a, bigint b)
{
	if(a.cmp(b)&gt;0)
		return true;
	return false;
}

bool operator&gt;=(bigint a, bigint b)
{
	if(a.cmp(b)&gt;=0)
		return true;
	return false;
}

bool operator==(bigint a, bigint b)
{
	if(a.cmp(b)==0)
		return true;
	return false;
}

bool operator!=(bigint a, bigint b)
{
	if(a.cmp(b)==0)
		return false;
	return true;
}

bigint bigint::operator|=(bigint b)
{
	*this=*this|b;
	return *this;
}

bigint bigint::operator&amp;=(bigint b)
{
	*this=*this&amp;b;
	return *this;
}
bigint bigint::operator^=(bigint b)
{
	*this=*this^b;
	return *this;
}

bigint bigint::operator+=(bigint b)
{
	*this=*this+b;
	return *this;
}

bigint bigint::operator-=(bigint b)
{
	*this=*this-b;
	return *this;
}

bigint bigint::operator*=(bigint b)
{
	*this=*this*b;
	return *this;
}

bigint bigint::operator/=(bigint b)
{
	*this=*this/b;
	return *this;
}

bigint bigint::operator%=(bigint b)
{
	*this=*this%b;
	return *this;
}

bigint bigint::operator&lt;&lt;=(bigint b)
{
	*this=*this&lt;&lt;b;
	return *this;
}

bigint bigint::operator&gt;&gt;=(bigint b)
{
	*this=*this&gt;&gt;b;
	return *this;
}

bigint bigint::operator++()
{
	*this+=1;
	return *this;
}

bigint bigint::operator++(int dummy)
{
	bigint old(*this);
	*this+=1;
	return old;
}

bigint bigint::operator--()
{
	*this-=1;
	return *this;
}

bigint bigint::operator--(int dummy)
{
	bigint old(*this);
	*this-=1;
	return old;
}

std::ostream&amp; operator&lt;&lt;(std::ostream&amp; os, bigint&amp; b)
{
	os&lt;&lt;((b.sign)?"-":"")&lt;&lt;b.conbcd();

	return os;
}

std::istream&amp; operator&gt;&gt;(std::istream&amp; is, bigint&amp; b)
{
	std::string numstr;
	is&gt;&gt;numstr;
	b=numstr.c_str();

	return is;
}

bigint fac(bigint n)  
{  
	bigint result=1;
	for(; n&gt;0; n--)
		result*=n;
	return result;
}

int main()
{
	std::ofstream fout;
	fout.open("result.txt");

	bigint n=1;

	std::cin&gt;&gt;n;
	while(n&gt;0)
	{
		fout&lt;&lt;fac(n)&lt;&lt;'\n';
		std::cin&gt;&gt;n;
	}

	return 0;
}
&lt;/textarea&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;font class="Apple-style-span" color="#000000" face="-webkit-monospace" size="3"&gt;&lt;span class="Apple-style-span" style="font-size: 13px; line-height: normal;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;
&lt;font class="Apple-style-span" color="#000000" face="-webkit-monospace" size="3"&gt;&lt;span class="Apple-style-span" style="font-size: 13px; line-height: normal;"&gt;앜ㅋㅋㅋ 더럽다.&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;
&lt;font class="Apple-style-span" color="#000000" face="-webkit-monospace" size="3"&gt;&lt;span class="Apple-style-span" style="font-size: 13px; line-height: normal;"&gt;10진수 출력 고쳤어&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div class="entry-ccl" style="clear: both; text-align: right; margin-bottom: 10px"&gt;
	&lt;img id="ccl-icon-459-0" class="entry-ccl-by" src="http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black01.png" alt="저작자 표시"/&gt;
	&lt;img id="ccl-icon-459-1" class="entry-ccl-nc" src="http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black02.png" alt="비영리"/&gt;
	&lt;img id="ccl-icon-459-2" class="entry-ccl-nd" src="http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black03.png" alt="변경 금지"/&gt;
	&lt;!--
	&lt;rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"&gt;
		&lt;Work rdf:about=""&gt;
			&lt;license rdf:resource="http://creativecommons.org/licenses/by-nc-nd/2.0/kr/" /&gt;
		&lt;/Work&gt;
		&lt;License rdf:about="http://creativecommons.org/licenses/by-nc-nd/"&gt;
			&lt;permits rdf:resource="http://web.resource.org/cc/Reproduction"/&gt;
			&lt;permits rdf:resource="http://web.resource.org/cc/Distribution"/&gt;
			&lt;requires rdf:resource="http://web.resource.org/cc/Notice"/&gt;
			&lt;requires rdf:resource="http://web.resource.org/cc/Attribution"/&gt;
			&lt;prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/&gt;
		&lt;/License&gt;
	&lt;/rdf:RDF&gt;
	--&gt;
&lt;/div&gt;
&lt;div class="tt-plugin tt-share-entry-with-sns tt-sns-icon-alignment-right tt-sns-icon-size-small"&gt;
	&lt;div class="tt-sns-wrap" id="ttSnsWrap-"&gt;
		&lt;ul class="tt-sns-service-default"&gt;
			&lt;li class="tt-sns-service-mypeople"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('mypeople', '', '');"&gt;마이피플&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-twitter"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('twitter', '', '');"&gt;트위터&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-facebook"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('facebook', '', '');"&gt;페이스북&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-other"&gt;&lt;a href="javascript:;" onmouseover="ShareEntryWithSNS.showLayer(event, '');" onmouseout="ShareEntryWithSNS.hideLayer(event, '');"&gt;더보기&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
		&lt;ul class="tt-sns-service-more" id="ttSnsServiceMore-" onmouseout="ShareEntryWithSNS.hideLayer(event, '');"&gt;
			&lt;li class="tt-sns-service-me2day"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('me2day', '', '');"&gt;미투데이&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-yozm"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('yozm', '', '');"&gt;요즘&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/div&gt;
	&lt;div class="tt-sns-clear"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="blogger-news-widget" style="width: 100%; text-align: center"&gt;
		  					&lt;embed src="http://api.v.daum.net/static/recombox1.swf" quality="high" flashvars="nid=4001059" allowscriptaccess="always" allowfullscreen="false" bgcolor="#ffffff" width="400" height="80" type="application/x-shockwave-flash" wmode="transparent"&gt;&lt;/embed&gt;
						&lt;/div&gt;&lt;div style="text-align:right; padding-top:10px;"&gt;
&lt;iframe src="http://www.facebook.com/plugins/like.php?href=zfanta.com/459&amp;amp;layout=button_count&amp;amp;show_faces=true&amp;amp;width=90&amp;amp;action=like&amp;amp;font=tahoma&amp;amp;colorscheme=light&amp;amp;height=65" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:65px;" allowTransparency="true"&gt;&lt;/iframe&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/zfanta/~4/i05zQ1l_brE" height="1" width="1"/&gt;</description>
			<category>bigint</category>
			<category>bigint</category>
			<category>C++</category>
			<category>Class</category>
			<author>　환타</author>
			<guid isPermaLink="false">http://zfanta.com/459</guid>
			<comments>http://zfanta.com/entry/c-bigint-class%EC%99%84%EC%84%B1#entry459comment</comments>
			<pubDate>Sun, 20 Dec 2009 17:49:02 +0900</pubDate>
		<feedburner:origLink>http://zfanta.com/459</feedburner:origLink></item>
		<item>
			<title>visual studio의 쉬프트연산 버그</title>
			<link>http://feedproxy.google.com/~r/zfanta/~3/qAbtzkZSnLs/460</link>
			<description>&lt;textarea class="c" name="code" style="margin-left: 0px; margin-right: 0px; width: 504px; margin-top: 1px; margin-bottom: 1px; height: 236px; "&gt;
int main()
{
	int i;
	
	i=0;
	i|=1&gt;&gt;(32-i);
	printf("%d\n",i);
	
	i=0;
	i|=1&gt;&gt;(32-0);
	printf("%d\n",i);

	return 0;
}
&lt;/textarea&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
vs에서 실행한 결과&lt;/div&gt;
&lt;div&gt;
&lt;div class="imageblock" style="display:inline;"&gt;&lt;a href="http://cfile21.uf.tistory.com/original/2061550C4AA35E665ECDD8" rel="lightbox" target="_blank"&gt;&lt;img src="http://cfile21.uf.tistory.com/image/2061550C4AA35E665ECDD8" alt="" filemime="image/jpeg" filename="bug.jpg" height="390" width="414"/&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
codepad에서 실행한 결과(&lt;a href="http://codepad.org/7uYLNz6m" target="_blank" title="[http://codepad.org/7uYLNz6m]로 이동합니다."&gt;http://codepad.org/7uYLNz6m&lt;/a&gt;)&lt;/div&gt;
&lt;div&gt;&lt;div class="imageblock" style="display:inline;"&gt;&lt;a href="http://cfile4.uf.tistory.com/original/15693F0B4AA35EE659889C" rel="lightbox" target="_blank"&gt;&lt;img src="http://cfile4.uf.tistory.com/image/15693F0B4AA35EE659889C" alt="" filemime="" filename="codepad.jpg" height="363" width="319"/&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;
내가 이거때문에 bigint삽질을 얼마나 했는지&lt;/div&gt;
&lt;div&gt;&lt;div class="imageblock" style="display:inline;"&gt;&lt;a href="http://cfile22.uf.tistory.com/original/1218C3164AA363643F23DF" rel="lightbox" target="_blank"&gt;&lt;img src="http://cfile22.uf.tistory.com/image/1218C3164AA363643F23DF" alt="" filemime="image/jpeg" filename="디질래.jpg" height="640" width="480"/&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;
죽어&lt;/div&gt;&lt;div class="entry-ccl" style="clear: both; text-align: right; margin-bottom: 10px"&gt;
	&lt;img id="ccl-icon-460-0" class="entry-ccl-by" src="http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black01.png" alt="저작자 표시"/&gt;
	&lt;img id="ccl-icon-460-1" class="entry-ccl-nc" src="http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black02.png" alt="비영리"/&gt;
	&lt;img id="ccl-icon-460-2" class="entry-ccl-nd" src="http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black03.png" alt="변경 금지"/&gt;
	&lt;!--
	&lt;rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"&gt;
		&lt;Work rdf:about=""&gt;
			&lt;license rdf:resource="http://creativecommons.org/licenses/by-nc-nd/2.0/kr/" /&gt;
		&lt;/Work&gt;
		&lt;License rdf:about="http://creativecommons.org/licenses/by-nc-nd/"&gt;
			&lt;permits rdf:resource="http://web.resource.org/cc/Reproduction"/&gt;
			&lt;permits rdf:resource="http://web.resource.org/cc/Distribution"/&gt;
			&lt;requires rdf:resource="http://web.resource.org/cc/Notice"/&gt;
			&lt;requires rdf:resource="http://web.resource.org/cc/Attribution"/&gt;
			&lt;prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/&gt;
		&lt;/License&gt;
	&lt;/rdf:RDF&gt;
	--&gt;
&lt;/div&gt;
&lt;div class="tt-plugin tt-share-entry-with-sns tt-sns-icon-alignment-right tt-sns-icon-size-small"&gt;
	&lt;div class="tt-sns-wrap" id="ttSnsWrap-"&gt;
		&lt;ul class="tt-sns-service-default"&gt;
			&lt;li class="tt-sns-service-mypeople"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('mypeople', '', '');"&gt;마이피플&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-twitter"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('twitter', '', '');"&gt;트위터&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-facebook"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('facebook', '', '');"&gt;페이스북&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-other"&gt;&lt;a href="javascript:;" onmouseover="ShareEntryWithSNS.showLayer(event, '');" onmouseout="ShareEntryWithSNS.hideLayer(event, '');"&gt;더보기&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
		&lt;ul class="tt-sns-service-more" id="ttSnsServiceMore-" onmouseout="ShareEntryWithSNS.hideLayer(event, '');"&gt;
			&lt;li class="tt-sns-service-me2day"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('me2day', '', '');"&gt;미투데이&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-yozm"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('yozm', '', '');"&gt;요즘&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/div&gt;
	&lt;div class="tt-sns-clear"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="blogger-news-widget" style="width: 100%; text-align: center"&gt;
		  					&lt;embed src="http://api.v.daum.net/static/recombox1.swf" quality="high" flashvars="nid=4118112" allowscriptaccess="always" allowfullscreen="false" bgcolor="#ffffff" width="400" height="80" type="application/x-shockwave-flash" wmode="transparent"&gt;&lt;/embed&gt;
						&lt;/div&gt;&lt;div style="text-align:right; padding-top:10px;"&gt;
&lt;iframe src="http://www.facebook.com/plugins/like.php?href=zfanta.com/460&amp;amp;layout=button_count&amp;amp;show_faces=true&amp;amp;width=90&amp;amp;action=like&amp;amp;font=tahoma&amp;amp;colorscheme=light&amp;amp;height=65" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:65px;" allowTransparency="true"&gt;&lt;/iframe&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/zfanta/~4/qAbtzkZSnLs" height="1" width="1"/&gt;</description>
			<category>C/C++</category>
			<category>Visual Studio</category>
			<category>버그</category>
			<author>　환타</author>
			<guid isPermaLink="false">http://zfanta.com/460</guid>
			<comments>http://zfanta.com/entry/visual-studio%EC%9D%98-%EC%89%AC%ED%94%84%ED%8A%B8%EC%97%B0%EC%82%B0-%EB%B2%84%EA%B7%B8#entry460comment</comments>
			<pubDate>Sun, 06 Sep 2009 16:24:26 +0900</pubDate>
		<feedburner:origLink>http://zfanta.com/460</feedburner:origLink></item>
		<item>
			<title>C언어로 오목게임만들기 개선</title>
			<link>http://feedproxy.google.com/~r/zfanta/~3/YGBN5rEARIo/456</link>
			<description>&lt;div&gt;
&lt;font class="Apple-style-span" color="#000000" face="-webkit-monospace" size="3"&gt;&lt;span class="Apple-style-span" style="font-size: 13px; line-height: normal;"&gt;&lt;a href="http://zfanta.com/entry/C%EC%96%B8%EC%96%B4%EB%A1%9C-%EC%98%A4%EB%AA%A9%EB%A7%8C%EB%93%A4%EA%B8%B0-5-%EB%A7%88%EC%A7%80%EB%A7%89"&gt;http://zfanta.com/entry/C언어로-오목만들기-5-마지막&lt;/a&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;
&lt;font class="Apple-style-span" color="#000000" face="-webkit-monospace" size="3"&gt;&lt;span class="Apple-style-span" style="font-size: 13px; line-height: normal;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;
&lt;font class="Apple-style-span" color="#000000" face="-webkit-monospace" size="3"&gt;&lt;span class="Apple-style-span" style="font-size: 13px; line-height: normal;"&gt;배운지 얼마 안돼서 만들었던 더러운 소스를 개선해봤습니다.&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;
&lt;font class="Apple-style-span" color="#000000" face="-webkit-monospace" size="3"&gt;&lt;span class="Apple-style-span" style="font-size: 13px; line-height: normal; "&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;textarea class="c" name="code" style="margin-top: 1px; margin-bottom: 1px; height: 3617px; margin-left: 0px; margin-right: 0px; width: 100%; "&gt;
#include &lt;stdio.h&gt;
#include &lt;string.h&gt;
#include &lt;conio.h&gt;
#include &lt;windows.h&gt;

#define UP 72  
#define DOWN 80  
#define LEFT 75  
#define RIGHT 77  
#define ENTER 13  

int board[19][19];
char display[19][19][3];

//커서 숨기기, 보이기(0, 1)
void CursorView(char show)
{
	HANDLE hConsole;
	CONSOLE_CURSOR_INFO ConsoleCursor;
	hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
	ConsoleCursor.bVisible = show;
	ConsoleCursor.dwSize = 1;
	SetConsoleCursorInfo(hConsole , &amp;ConsoleCursor);
}

//커서이동
void gotoxy(int x, int y)
{  
	COORD XY = {x, y};  
	SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), XY);  
}  

//승리메시지, 이어하기
int w_msg(int turn)
{
	char player[3][3]={"", "흑", "백"};
	char ans;

	gotoxy(0,20);
	printf("%s승리 계속할래? (y,n)", player[turn]);

	fflush(stdin);
	scanf("%c", &amp;ans);

	if(ans=='y')
		return 1;

	return 0;
}

//판깔기
void set()
{
	int y, x;

	memset(board, 0, sizeof(int)*19*19);

	strcpy(display[0][0], "┌");strcpy(display[0][18] ,"┐");
	strcpy(display[18][0],"└");strcpy(display[18][18],"┘");

	for(y=1; y&lt;18; y++)
	{
		strcpy(display[y][0], "├");
		strcpy(display[y][18],"┤");
	}
	for(x=1; x&lt;18; x++)
	{
		strcpy(display[0][x], "┬");
		strcpy(display[18][x],"┴");
	}
	for(y=1; y&lt;18; y++)	
		for(x=1; x&lt;18; x++)		
			strcpy(display[y][x],"┼");

	system("CLS");
	for(y=0; y&lt;19; y++, puts(""))
		for(x=0; x&lt;19; x++)
			printf("%s", display[y][x]);
}

//5개 확인
int win(int _y, int _x, int turn)
{
	int x,y;
	int count;
	//가로
	x=_x;
	count=0;
	while(x&gt;0 &amp;&amp; board[_y][x-1] == turn)x--;
	while(x&lt;=18 &amp;&amp; board[_y][x++] == turn)
		count++;

	if(count==5)
	{
		return 1;
	}

	//세로
	x=_x;
	y=_y;
	count=0;

	while(y&gt;0 &amp;&amp; board[y-1][_x] == turn)y--;
	while(y&lt;=18 &amp;&amp; board[y++][_x] == turn)
		count++;

	if(count==5)
	{
		return 1;
	}

	//대각선 ↘
	x=_x;
	y=_y;
	count=0;

	while(x &gt; 0 &amp;&amp; y &gt; 0 &amp;&amp; board[y-1][x-1]==turn)
	{
		x--;
		y--;
	}

	while(x&lt;=18 &amp;&amp; y&lt;=18 &amp;&amp; board[y++][x++] == turn)
		count++;

	if(count==5)
	{
		return 1;
	}

	//대각선 ↙
	x=_x;
	y=_y;
	count=0;

	while(x &lt; 18 &amp;&amp; y &gt; 0 &amp;&amp; board[y-1][x+1]==turn)
	{
		x++;
		y--;
	}

	while(x&gt;=0 &amp;&amp; y&lt;=18 &amp;&amp; board[y++][x--] == turn)
		count++;

	if(count==5)
	{
		return 1;
	}
	return 0;
}


void move(int *y, int *x)
{
	int old_y=*y, old_x=*x;
	char input;

	while((input=getch()) != ENTER)
	{
		if(input == UP)
		{
			old_x=*x;
			old_y=(*y)--;
		}
		else if(input == DOWN)
		{
			old_x=*x;
			old_y=(*y)++;
		}
		else if(input == LEFT)
		{
			old_x=(*x)--;
			old_y=*y;
		}
		else if(input == RIGHT)
		{
			old_x=(*x)++;
			old_y=*y;
		}

		//나머지 연산 엥꼬 방지를 위해 19를 더해줍니다.
		(*x)=((*x) + 19) % 19;
		(*y)=((*y) + 19) % 19;

		gotoxy(old_x*2, old_y);
		printf("%s", display[old_y][old_x]);

		gotoxy((*x)*2, *y);
		printf("⊙");
	}
}

int put_stone(int y, int x, int turn)
{
	char stone[3][3]={"","○","●"};
	if(board[y][x] == 0)
	{
		board[y][x]=turn;

		strcpy(display[y][x], stone[turn]);
		gotoxy(x*2, y);
		printf("%s", stone[turn]);
		return 1;
	}
	return 0;
}

int game()
{
	int y, x, turn;	//1:흑, 2:백
	char stone[3][3]={"","○","●"};

	set();	
	y=x=9;
	turn=2;

	gotoxy(x*2,y);
	printf("⊙");
	do
	{
		turn^=3;	//1은 2로, 2는 1로

		gotoxy(50, 10);
		printf("%s차례", stone[turn]);

		do
		{
			move(&amp;y, &amp;x);
		}while(!put_stone(y, x, turn));
	}while(!win(y, x, turn));

	return w_msg(turn);
}

int main()
{
	CursorView(0);
	while(game());
	return 0;
}
&lt;/textarea&gt;&lt;div&gt;
&lt;font class="Apple-style-span" color="#000000" face="-webkit-monospace" size="3"&gt;&lt;span class="Apple-style-span" style="font-size: 13px; line-height: normal;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;
&lt;font class="Apple-style-span" color="#000000" face="-webkit-monospace" size="3"&gt;&lt;span class="Apple-style-span" style="font-size: 13px; line-height: normal;"&gt;지금 다시 만들어도 더럽긴 하네요.......&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;
&lt;font class="Apple-style-span" color="#000000" face="-webkit-monospace" size="3"&gt;&lt;span class="Apple-style-span" style="font-size: 13px; line-height: normal;"&gt;질문이나 버그는 리플로 많이 달아주세요.&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;
&lt;font class="Apple-style-span" color="#000000" face="-webkit-monospace" size="3"&gt;&lt;span class="Apple-style-span" style="font-size: 13px; line-height: normal;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;
&lt;font class="Apple-style-span" color="#000000" face="-webkit-monospace" size="3"&gt;&lt;span class="Apple-style-span" style="font-size: 13px; line-height: normal;"&gt;&lt;p id="more456_0" class="moreless_fold"&gt;&lt;span style="cursor: pointer;" onclick="toggleMoreLess(this, '456_0','영양가 없는 글에는 짤방','접기'); return false;"&gt;영양가 없는 글에는 짤방&lt;/span&gt;&lt;/p&gt;&lt;div id="content456_0" class="moreless_content" style="display: none;"&gt;&lt;div class="imageblock" style="display:inline;"&gt;&lt;a href="http://cfile2.uf.tistory.com/original/113C9F204A6AE993016BED" rel="lightbox" target="_blank"&gt;&lt;img src="http://cfile2.uf.tistory.com/image/113C9F204A6AE993016BED" alt="" filemime="image/jpeg" filename="초딩.jpg" height="2700" width="400"/&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div class="entry-ccl" style="clear: both; text-align: right; margin-bottom: 10px"&gt;
	&lt;img id="ccl-icon-456-0" class="entry-ccl-by" src="http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black01.png" alt="저작자 표시"/&gt;
	&lt;img id="ccl-icon-456-1" class="entry-ccl-nc" src="http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black02.png" alt="비영리"/&gt;
	&lt;img id="ccl-icon-456-2" class="entry-ccl-nd" src="http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black03.png" alt="변경 금지"/&gt;
	&lt;!--
	&lt;rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"&gt;
		&lt;Work rdf:about=""&gt;
			&lt;license rdf:resource="http://creativecommons.org/licenses/by-nc-nd/2.0/kr/" /&gt;
		&lt;/Work&gt;
		&lt;License rdf:about="http://creativecommons.org/licenses/by-nc-nd/"&gt;
			&lt;permits rdf:resource="http://web.resource.org/cc/Reproduction"/&gt;
			&lt;permits rdf:resource="http://web.resource.org/cc/Distribution"/&gt;
			&lt;requires rdf:resource="http://web.resource.org/cc/Notice"/&gt;
			&lt;requires rdf:resource="http://web.resource.org/cc/Attribution"/&gt;
			&lt;prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/&gt;
		&lt;/License&gt;
	&lt;/rdf:RDF&gt;
	--&gt;
&lt;/div&gt;
&lt;div class="tt-plugin tt-share-entry-with-sns tt-sns-icon-alignment-right tt-sns-icon-size-small"&gt;
	&lt;div class="tt-sns-wrap" id="ttSnsWrap-"&gt;
		&lt;ul class="tt-sns-service-default"&gt;
			&lt;li class="tt-sns-service-mypeople"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('mypeople', '', '');"&gt;마이피플&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-twitter"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('twitter', '', '');"&gt;트위터&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-facebook"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('facebook', '', '');"&gt;페이스북&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-other"&gt;&lt;a href="javascript:;" onmouseover="ShareEntryWithSNS.showLayer(event, '');" onmouseout="ShareEntryWithSNS.hideLayer(event, '');"&gt;더보기&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
		&lt;ul class="tt-sns-service-more" id="ttSnsServiceMore-" onmouseout="ShareEntryWithSNS.hideLayer(event, '');"&gt;
			&lt;li class="tt-sns-service-me2day"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('me2day', '', '');"&gt;미투데이&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-yozm"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('yozm', '', '');"&gt;요즘&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/div&gt;
	&lt;div class="tt-sns-clear"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="blogger-news-widget" style="width: 100%; text-align: center"&gt;
		  					&lt;embed src="http://api.v.daum.net/static/recombox1.swf" quality="high" flashvars="nid=3758571" allowscriptaccess="always" allowfullscreen="false" bgcolor="#ffffff" width="400" height="80" type="application/x-shockwave-flash" wmode="transparent"&gt;&lt;/embed&gt;
						&lt;/div&gt;&lt;div style="text-align:right; padding-top:10px;"&gt;
&lt;iframe src="http://www.facebook.com/plugins/like.php?href=zfanta.com/456&amp;amp;layout=button_count&amp;amp;show_faces=true&amp;amp;width=90&amp;amp;action=like&amp;amp;font=tahoma&amp;amp;colorscheme=light&amp;amp;height=65" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:65px;" allowTransparency="true"&gt;&lt;/iframe&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/zfanta/~4/YGBN5rEARIo" height="1" width="1"/&gt;</description>
			<category>C/C++</category>
			<category>c</category>
			<category>게임</category>
			<category>오목</category>
			<author>　환타</author>
			<guid isPermaLink="false">http://zfanta.com/456</guid>
			<comments>http://zfanta.com/entry/C%EC%96%B8%EC%96%B4%EB%A1%9C-%EC%98%A4%EB%AA%A9%EA%B2%8C%EC%9E%84%EB%A7%8C%EB%93%A4%EA%B8%B0-%EA%B0%9C%EC%84%A0#entry456comment</comments>
			<pubDate>Sat, 25 Jul 2009 20:17:42 +0900</pubDate>
		<feedburner:origLink>http://zfanta.com/456</feedburner:origLink></item>
		<item>
			<title>프로그래밍 카테고리의 새글은 Studying the Logical World에 쓰여집니다.</title>
			<link>http://feedproxy.google.com/~r/zfanta/~3/UlaO5JhgrQw/452</link>
			<description>&lt;font class="Apple-style-span" color="#000000" face="Verdana"&gt;&lt;div&gt;
오래 전부터 &lt;a href="http://studyinglw.tistory.com" target="_blank" title="[http://studyinglw.tistory.com]로 이동합니다."&gt;Studying the Logical World.&lt;/a&gt;의 &lt;a href="http://studyinglw.tistory.com" target="_blank" title="[http://studyinglw.tistory.com]로 이동합니다."&gt;fanta's&lt;/a&gt;카테고리에 글 쓰고 있었습니다.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
새 글은 &lt;a href="http://studyinglw.tistory.com" target="_blank" title="[http://studyinglw.tistory.com]로 이동합니다."&gt;http://studyinglw.tistory.com&lt;/a&gt;에서 확인해주세요.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div class="imageblock" style="display:inline;"&gt;&lt;a href="http://cfile5.uf.tistory.com/original/1822DC164A2BCBB1E16A3E" rel="lightbox" target="_blank"&gt;&lt;img src="http://cfile5.uf.tistory.com/image/1822DC164A2BCBB1E16A3E" alt="" filemime="image/jpeg" filename="개밥 털이.jpg" height="375" width="400"/&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
많이 들러주세요.&lt;/div&gt;
&lt;/font&gt;&lt;div class="entry-ccl" style="clear: both; text-align: right; margin-bottom: 10px"&gt;
	&lt;img id="ccl-icon-452-0" class="entry-ccl-by" src="http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black01.png" alt="저작자 표시"/&gt;
	&lt;img id="ccl-icon-452-1" class="entry-ccl-nc" src="http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black02.png" alt="비영리"/&gt;
	&lt;img id="ccl-icon-452-2" class="entry-ccl-nd" src="http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black03.png" alt="변경 금지"/&gt;
	&lt;!--
	&lt;rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"&gt;
		&lt;Work rdf:about=""&gt;
			&lt;license rdf:resource="http://creativecommons.org/licenses/by-nc-nd/2.0/kr/" /&gt;
		&lt;/Work&gt;
		&lt;License rdf:about="http://creativecommons.org/licenses/by-nc-nd/"&gt;
			&lt;permits rdf:resource="http://web.resource.org/cc/Reproduction"/&gt;
			&lt;permits rdf:resource="http://web.resource.org/cc/Distribution"/&gt;
			&lt;requires rdf:resource="http://web.resource.org/cc/Notice"/&gt;
			&lt;requires rdf:resource="http://web.resource.org/cc/Attribution"/&gt;
			&lt;prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/&gt;
		&lt;/License&gt;
	&lt;/rdf:RDF&gt;
	--&gt;
&lt;/div&gt;
&lt;div class="tt-plugin tt-share-entry-with-sns tt-sns-icon-alignment-right tt-sns-icon-size-small"&gt;
	&lt;div class="tt-sns-wrap" id="ttSnsWrap-"&gt;
		&lt;ul class="tt-sns-service-default"&gt;
			&lt;li class="tt-sns-service-mypeople"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('mypeople', '', '');"&gt;마이피플&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-twitter"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('twitter', '', '');"&gt;트위터&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-facebook"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('facebook', '', '');"&gt;페이스북&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-other"&gt;&lt;a href="javascript:;" onmouseover="ShareEntryWithSNS.showLayer(event, '');" onmouseout="ShareEntryWithSNS.hideLayer(event, '');"&gt;더보기&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
		&lt;ul class="tt-sns-service-more" id="ttSnsServiceMore-" onmouseout="ShareEntryWithSNS.hideLayer(event, '');"&gt;
			&lt;li class="tt-sns-service-me2day"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('me2day', '', '');"&gt;미투데이&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-yozm"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('yozm', '', '');"&gt;요즘&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/div&gt;
	&lt;div class="tt-sns-clear"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style="text-align:right; padding-top:10px;"&gt;
&lt;iframe src="http://www.facebook.com/plugins/like.php?href=zfanta.com/452&amp;amp;layout=button_count&amp;amp;show_faces=true&amp;amp;width=90&amp;amp;action=like&amp;amp;font=tahoma&amp;amp;colorscheme=light&amp;amp;height=65" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:65px;" allowTransparency="true"&gt;&lt;/iframe&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/zfanta/~4/UlaO5JhgrQw" height="1" width="1"/&gt;</description>
			<category>Programming</category>
			<author>　환타</author>
			<guid isPermaLink="false">http://zfanta.com/452</guid>
			<comments>http://zfanta.com/entry/%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%B0%8D-%EC%B9%B4%ED%85%8C%EA%B3%A0%EB%A6%AC%EC%9D%98-%EC%83%88%EA%B8%80%EC%9D%80-Studying-the-Logical-World%EC%97%90-%EC%93%B0%EC%97%AC%EC%A7%91%EB%8B%88%EB%8B%A4-1#entry452comment</comments>
			<pubDate>Sun, 07 Jun 2009 23:17:24 +0900</pubDate>
		<feedburner:origLink>http://zfanta.com/452</feedburner:origLink></item>
		<item>
			<title>C 연산자 우선순위</title>
			<link>http://feedproxy.google.com/~r/zfanta/~3/eO2xzCnFGoc/444</link>
			<description>&lt;span class="Apple-style-span" style="border-collapse: collapse; color: rgb(68, 68, 68); font-size: 13px; line-height: 22px; -webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px;"&gt;&lt;span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px;"&gt;&lt;table border="1" cellspacing="0" bordercolordark="white" bordercolorlight="black" width="100%"&gt;
    &lt;tbody&gt;&lt;tr&gt;
        &lt;td width="30%" height="21"&gt;1(우선순위, 낮을수록 먼저 수행)&lt;/td&gt;
        &lt;td width="35%" height="21"&gt;            &lt;p&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: 돋움; line-height: 19px; "&gt;( ) [ ] -&gt; .&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
        &lt;td width="35%" height="21"&gt;            &lt;p&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: 돋움; line-height: 19px; "&gt;&lt;span style="font-family: 굴림; "&gt;왼쪽&lt;/span&gt; &lt;span style="font-family: 굴림; "&gt;우선&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td width="30%"&gt;2&lt;/td&gt;
        &lt;td width="35%"&gt;            &lt;p&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: 돋움; line-height: 19px; "&gt;&lt;span lang="EN-US"&gt;! ~ ++ -- + -(&lt;/span&gt;&lt;span style="font-family: 굴림; "&gt;부호&lt;/span&gt;&lt;span lang="EN-US"&gt;) *(&lt;/span&gt;&lt;span style="font-family: 굴림; "&gt;포인터&lt;/span&gt;&lt;span lang="EN-US"&gt;) &amp;amp; sizeof&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
        &lt;td width="35%"&gt;            &lt;p&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: 돋움; line-height: 19px; "&gt;&lt;span style="font-family: 굴림; "&gt;오른쪽&lt;/span&gt; &lt;span style="font-family: 굴림; "&gt;우선&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td width="30%"&gt;3&lt;/td&gt;
        &lt;td width="35%"&gt;            &lt;p&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: 돋움; line-height: 19px; "&gt;&lt;span lang="EN-US"&gt;*(&lt;/span&gt;&lt;span style="font-family: 굴림; "&gt;곱셈&lt;/span&gt;&lt;span lang="EN-US"&gt;) / %&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
        &lt;td width="35%"&gt;            &lt;p&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: 돋움; line-height: 19px; "&gt;&lt;span style="font-family: 굴림; "&gt;왼쪽&lt;/span&gt; &lt;span style="font-family: 굴림; "&gt;우선&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td width="30%"&gt;4&lt;/td&gt;
        &lt;td width="35%"&gt;            &lt;p&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: 돋움; line-height: 19px; "&gt;&lt;span lang="EN-US"&gt;+ -(&lt;/span&gt;&lt;span style="font-family: 굴림; "&gt;덧셈&lt;/span&gt;&lt;span lang="EN-US"&gt;, &lt;/span&gt;&lt;span style="font-family: 굴림; "&gt;뺄셈&lt;/span&gt;&lt;span lang="EN-US"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
        &lt;td width="35%"&gt;            &lt;p&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: 돋움; line-height: 19px; "&gt;&lt;span style="font-family: 굴림; "&gt;왼쪽&lt;/span&gt; &lt;span style="font-family: 굴림; "&gt;우선&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td width="30%"&gt;5&lt;/td&gt;
        &lt;td width="35%"&gt;            &lt;p&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: 돋움; line-height: 19px; "&gt;&amp;lt;&amp;lt; &gt;&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
        &lt;td width="35%"&gt;            &lt;p&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: 돋움; line-height: 19px; "&gt;&lt;span style="font-family: 굴림; "&gt;왼쪽&lt;/span&gt; &lt;span style="font-family: 굴림; "&gt;우선&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td width="30%"&gt;6&lt;/td&gt;
        &lt;td width="35%"&gt;            &lt;p&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: 돋움; line-height: 19px; "&gt;&amp;lt; &amp;lt;= &gt; &gt;=&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
        &lt;td width="35%"&gt;            &lt;p&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: 돋움; line-height: 19px; "&gt;&lt;span style="font-family: 굴림; "&gt;왼쪽&lt;/span&gt; &lt;span style="font-family: 굴림; "&gt;우선&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td width="30%"&gt;7&lt;/td&gt;
        &lt;td width="35%"&gt;            &lt;p&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: 돋움; line-height: 19px; "&gt;== !=&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
        &lt;td width="35%"&gt;            &lt;p&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: 돋움; line-height: 19px; "&gt;&lt;span style="font-family: 굴림; "&gt;왼쪽&lt;/span&gt; &lt;span style="font-family: 굴림; "&gt;우선&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td width="30%"&gt;8&lt;/td&gt;
        &lt;td width="35%"&gt;            &lt;p&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: 돋움; line-height: 19px; "&gt;&amp;amp;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
        &lt;td width="35%"&gt;            &lt;p&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: 돋움; line-height: 19px; "&gt;&lt;span style="font-family: 굴림; "&gt;왼쪽&lt;/span&gt; &lt;span style="font-family: 굴림; "&gt;우선&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td width="30%"&gt;9&lt;/td&gt;
        &lt;td width="35%"&gt;            &lt;p&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: 돋움; line-height: 19px; "&gt;^&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
        &lt;td width="35%"&gt;            &lt;p&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: 돋움; line-height: 19px; "&gt;&lt;span style="font-family: 굴림; "&gt;왼쪽&lt;/span&gt; &lt;span style="font-family: 굴림; "&gt;우선&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td width="30%"&gt;10&lt;/td&gt;
        &lt;td width="35%"&gt;            &lt;p&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: 돋움; line-height: 19px; "&gt;|&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
        &lt;td width="35%"&gt;            &lt;p&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: 돋움; line-height: 19px; "&gt;&lt;span style="font-family: 굴림; "&gt;왼쪽&lt;/span&gt; &lt;span style="font-family: 굴림; "&gt;우선&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td width="30%"&gt;11&lt;/td&gt;
        &lt;td width="35%"&gt;            &lt;p&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: 돋움; line-height: 19px; "&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
        &lt;td width="35%"&gt;            &lt;p&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: 돋움; line-height: 19px; "&gt;&lt;span style="font-family: 굴림; "&gt;왼쪽&lt;/span&gt; &lt;span style="font-family: 굴림; "&gt;우선&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td width="30%"&gt;12&lt;/td&gt;
        &lt;td width="35%"&gt;            &lt;p&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: 돋움; line-height: 19px; "&gt;||&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
        &lt;td width="35%"&gt;            &lt;p&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: 돋움; line-height: 19px; "&gt;&lt;span style="font-family: 굴림; "&gt;왼쪽&lt;/span&gt; &lt;span style="font-family: 굴림; "&gt;우선&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td width="30%"&gt;13&lt;/td&gt;
        &lt;td width="35%"&gt;            &lt;p&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: 돋움; line-height: 19px; "&gt;? :&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
        &lt;td width="35%"&gt;            &lt;p&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: 돋움; line-height: 19px; "&gt;&lt;span style="font-family: 굴림; "&gt;오른쪽&lt;/span&gt; &lt;span style="font-family: 굴림; "&gt;우선&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td width="30%"&gt;14&lt;/td&gt;
        &lt;td width="35%"&gt;            &lt;p&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: 돋움; line-height: 19px; "&gt;&lt;span lang="EN-US"&gt;= &lt;/span&gt;&lt;span style="font-family: 굴림; "&gt;복합대입&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
        &lt;td width="35%"&gt;            &lt;p&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: 돋움; line-height: 19px; "&gt;&lt;span style="font-family: 굴림; "&gt;오른쪽&lt;/span&gt; &lt;span style="font-family: 굴림; "&gt;우선&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td width="30%"&gt;15&lt;/td&gt;
        &lt;td width="35%"&gt;            &lt;p&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: 돋움; line-height: 19px; "&gt;,&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
        &lt;td width="35%"&gt;            &lt;p&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: 돋움; line-height: 19px; "&gt;&lt;span style="font-family: 굴림; "&gt;왼쪽&lt;/span&gt; &lt;span style="font-family: 굴림; "&gt;우선&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
    &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/span&gt;&lt;/span&gt;&lt;div&gt;
&lt;span class="Apple-style-span" style="border-collapse: collapse; color: rgb(68, 68, 68); font-size: 13px; line-height: 22px; -webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; color: rgb(68, 68, 68); font-size: 13px; line-height: 22px; -webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; color: rgb(68, 68, 68); font-size: 13px; line-height: 22px; -webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px;"&gt;외울 필요없이 그냥 헷갈리면 괄호로 감싸주세요.&lt;/span&gt;&lt;/div&gt;&lt;div class="entry-ccl" style="clear: both; text-align: right; margin-bottom: 10px"&gt;
	&lt;img id="ccl-icon-444-0" class="entry-ccl-by" src="http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black01.png" alt="저작자 표시"/&gt;
	&lt;img id="ccl-icon-444-1" class="entry-ccl-nc" src="http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black02.png" alt="비영리"/&gt;
	&lt;img id="ccl-icon-444-2" class="entry-ccl-nd" src="http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black03.png" alt="변경 금지"/&gt;
	&lt;!--
	&lt;rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"&gt;
		&lt;Work rdf:about=""&gt;
			&lt;license rdf:resource="http://creativecommons.org/licenses/by-nc-nd/2.0/kr/" /&gt;
		&lt;/Work&gt;
		&lt;License rdf:about="http://creativecommons.org/licenses/by-nc-nd/"&gt;
			&lt;permits rdf:resource="http://web.resource.org/cc/Reproduction"/&gt;
			&lt;permits rdf:resource="http://web.resource.org/cc/Distribution"/&gt;
			&lt;requires rdf:resource="http://web.resource.org/cc/Notice"/&gt;
			&lt;requires rdf:resource="http://web.resource.org/cc/Attribution"/&gt;
			&lt;prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/&gt;
		&lt;/License&gt;
	&lt;/rdf:RDF&gt;
	--&gt;
&lt;/div&gt;
&lt;div class="tt-plugin tt-share-entry-with-sns tt-sns-icon-alignment-right tt-sns-icon-size-small"&gt;
	&lt;div class="tt-sns-wrap" id="ttSnsWrap-"&gt;
		&lt;ul class="tt-sns-service-default"&gt;
			&lt;li class="tt-sns-service-mypeople"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('mypeople', '', '');"&gt;마이피플&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-twitter"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('twitter', '', '');"&gt;트위터&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-facebook"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('facebook', '', '');"&gt;페이스북&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-other"&gt;&lt;a href="javascript:;" onmouseover="ShareEntryWithSNS.showLayer(event, '');" onmouseout="ShareEntryWithSNS.hideLayer(event, '');"&gt;더보기&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
		&lt;ul class="tt-sns-service-more" id="ttSnsServiceMore-" onmouseout="ShareEntryWithSNS.hideLayer(event, '');"&gt;
			&lt;li class="tt-sns-service-me2day"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('me2day', '', '');"&gt;미투데이&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-yozm"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('yozm', '', '');"&gt;요즘&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/div&gt;
	&lt;div class="tt-sns-clear"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style="text-align:right; padding-top:10px;"&gt;
&lt;iframe src="http://www.facebook.com/plugins/like.php?href=zfanta.com/444&amp;amp;layout=button_count&amp;amp;show_faces=true&amp;amp;width=90&amp;amp;action=like&amp;amp;font=tahoma&amp;amp;colorscheme=light&amp;amp;height=65" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:65px;" allowTransparency="true"&gt;&lt;/iframe&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/zfanta/~4/eO2xzCnFGoc" height="1" width="1"/&gt;</description>
			<category>C/C++</category>
			<category>C언어</category>
			<author>　환타</author>
			<guid isPermaLink="false">http://zfanta.com/444</guid>
			<comments>http://zfanta.com/entry/%E3%85%81#entry444comment</comments>
			<pubDate>Sat, 07 Mar 2009 21:05:56 +0900</pubDate>
		<feedburner:origLink>http://zfanta.com/444</feedburner:origLink></item>
		<item>
			<title>UVa. 101 - The Blocks Problem 번역</title>
			<link>http://feedproxy.google.com/~r/zfanta/~3/atj-4uc_Wa8/442</link>
			<description>&lt;a href="http://원문링크" target="_blank" title="[http://원문링크]로 이동합니다."&gt;원문링크&lt;/a&gt;&lt;div&gt;
&lt;div class="imageblock" style="display:inline;"&gt;&lt;a href="http://zfanta.tistory.com/attachment/49a6708140732EY.pdf"&gt;&lt;img src="http://i1.daumcdn.net/cfs.tistory/v/0/blog/image/extension/pdf.gif" alt="" style="vertical-align: middle;" /&gt; 101.pdf&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: 'times new roman'; font-size: 16px; line-height: normal; "&gt;&lt;h1&gt;&lt;center&gt;&lt;table bgcolor="#0060F0"&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td&gt;&lt;b&gt;&lt;font size="5" color="#C0FFFF"&gt;&lt;a name="SECTION0001000000000000000000"&gt;블록 문제&lt;/a&gt; &lt;/font&gt;&lt;/b&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;&lt;/h1&gt;&lt;p&gt;&lt;/p&gt;
&lt;h2&gt;&lt;font color="#0070E8"&gt;&lt;a name="SECTION0001001000000000000000"&gt;배경&lt;/a&gt; &lt;/font&gt;&lt;/h2&gt;&lt;p&gt;과감히 생략.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;h2&gt;&lt;font color="#0070E8"&gt;&lt;a name="SECTION0001002000000000000000"&gt;문제&lt;/a&gt; &lt;/font&gt;&lt;/h2&gt;로봇의 팔이 평평한 테이블에 있는 블럭을 명령어대로 움직이게 하는 문제.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: 'times new roman'; font-size: 16px; line-height: normal;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: 'times new roman'; font-size: 16px; line-height: normal; "&gt;처음엔 아래처럼 n개의 블록(0부터 n-1까지)들이 있고 &lt;img width="106" height="31" align="MIDDLE" border="0" src="http://icpcres.ecs.baylor.edu/onlinejudge/external/1/101img1.gif" alt="$0 \leq i &amp;lt; n-1$"&gt;의 범위 내에 모든 &lt;span class="Apple-style-span" style="font-style: italic; "&gt;i&lt;/span&gt;에 대해 &lt;i&gt;b&lt;/i&gt;&lt;sub&gt;&lt;i&gt;i&lt;/i&gt;&lt;/sub&gt; 와  &lt;i&gt;b&lt;/i&gt;&lt;sub&gt;&lt;i&gt;i&lt;/i&gt;+1&lt;span class="Apple-style-span" style="font-size: 16px; "&gt;은 인접해있다.&lt;div class="imageblock center" style="text-align: center; clear: both;"&gt;&lt;a href="http://cfs13.tistory.com/original/26/tistory/2009/02/26/20/32/49a67de66d5e5" rel="lightbox" target="_blank"&gt;&lt;img src="http://cfs13.tistory.com/image/26/tistory/2009/02/26/20/32/49a67de66d5e5" alt="" filemime="" filename="101img2.gif" height="52" width="433"/&gt;&lt;/a&gt;&lt;/div&gt;&lt;/span&gt;&lt;/sub&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: 'times new roman'; font-size: 16px; line-height: normal; "&gt;&lt;div align="CENTER"&gt;
&lt;strong&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 51); font-weight: normal;"&gt;&lt;br /&gt;
&lt;/span&gt;그림 :&lt;/strong&gt; 아름다운 초기의 블럭나라&lt;/div&gt;
&lt;br /&gt;
&lt;p&gt;로봇의 팔에 하사하는 명령어 :&lt;/p&gt;
&lt;p&gt;*a와 b는 블럭번호.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;move &lt;i&gt;a&lt;/i&gt; onto &lt;i&gt;b&lt;/i&gt;&lt;p&gt;a와 b에 있는 블록들을 제자리에 돌려놓고 a블럭을 b블럭 위로 옮긴다.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;move &lt;i&gt;a&lt;/i&gt; over &lt;i&gt;b&lt;/i&gt;&lt;p&gt;a위에 있는 블록들을 제자리에 돌려놓고 b블럭이 있는 블럭 기둥의 꼭대기로 a를 옮긴다.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;pile &lt;i&gt;a&lt;/i&gt; onto &lt;i&gt;b&lt;/i&gt;&lt;p&gt;b위에 있는 블록들을 제자리에 돌려놓고 a블록 위에 있는 블록기둥( a를 포함하여)을 b위로 옮긴다. 옮길 때 블록의 순서는 유지한다.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;pile &lt;i&gt;a&lt;/i&gt; over &lt;i&gt;b&lt;br /&gt;
&lt;/i&gt;&lt;p&gt;a블록 위에 있는 블록기둥( a를 포함하여)을 b가 있는 블록기둥위로 옮긴다. 옮길 때 블록의 순서는 유지한다.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;quit&lt;p&gt;종료.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;a = b일 때나 a와 b가 같은 블록기둥에 있을 때는 잘못된 명령이므로 무시한다.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;h2&gt;&lt;font color="#0070E8"&gt;&lt;a name="SECTION0001003000000000000000"&gt;입력&lt;/a&gt; &lt;/font&gt;&lt;/h2&gt;첫 줄은 블록나라의 블록 개수를 나타내는 n(0 &amp;lt; &lt;i&gt;n&lt;/i&gt; &amp;lt; 25)이 입력된다.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: 'times new roman'; font-size: 16px; line-height: normal;"&gt;두 번째 줄부터 한 줄에 하나의 명령어가 입력되며 quit명령어가 입력될 때 까지 실행한다.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: 'times new roman'; font-size: 16px; line-height: normal; "&gt;
&lt;p&gt;잘못된 문법의 명령어는 없다.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;h2&gt;&lt;font color="#0070E8"&gt;&lt;a name="SECTION0001004000000000000000"&gt;출력&lt;/a&gt; &lt;/font&gt;&lt;/h2&gt;&lt;p&gt;블록나라의 최종모습을 출력한다. &lt;/p&gt;
&lt;p&gt;각 줄의 처음에는 블록기둥 위치의 번호 &lt;i&gt;i&lt;/i&gt; ( &lt;img width="76" height="31" align="MIDDLE" border="0" src="/attachment/49a67e3fcc730BY.gif" alt="$0 \leq i &amp;lt; n$"&gt;, n은 블록의 개수)를 출력하고 바로 다음에 콜론(:)을 출력한다 . &lt;/p&gt;
&lt;p&gt;공백문자 하나를 출력한다.&lt;/p&gt;
&lt;p&gt;블록이 있다면 공백문자로 구분하여 출력하고 없다면 출력하지 않는다.&lt;/p&gt;
&lt;p&gt;줄 끝에는 공백이 있으면 안된다.&lt;/p&gt;
&lt;p&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 112, 232); font-size: 24px; font-weight: bold; "&gt;&lt;a name="SECTION0001005000000000000000"&gt;입력 예시&lt;/a&gt; &lt;/span&gt;&lt;/p&gt;
&lt;pre&gt;10
move 9 onto 1
move 8 over 1
move 7 over 1
move 6 over 1
pile 8 over 6
pile 8 over 5
move 2 over 1
move 4 over 9
quit
&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;
&lt;h2&gt;&lt;font color="#0070E8"&gt;&lt;a name="SECTION0001006000000000000000"&gt;출력 예시&lt;/a&gt; &lt;/font&gt;&lt;/h2&gt;&lt;pre&gt; 0: 0
 1: 1 9 2 4
 2:
 3: 3
 4:
 5: 5 8 7 6
 6:
 7:
 8:
 9:&lt;/pre&gt;&lt;pre&gt;&lt;br /&gt;
&lt;/pre&gt;&lt;pre&gt;&lt;br /&gt;
&lt;/pre&gt;&lt;pre&gt;AC&lt;/pre&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;textarea class="c" name="code" style="margin-top: 1px; margin-bottom: 1px; height: 2015px; margin-left: 0px; margin-right: 0px; width: 705px; "&gt;
#include &lt;iostream&gt;
#include &lt;vector&gt;

using namespace std;
int n;
vector&lt; int &gt; blocks[25];

void init()
{
	int i;
	for(i=0; i&lt;n; i++)
		blocks[i].push_back(i);
}

int find_block(int block)
{
	int i,j;
	
	for(i=0; i&lt;n; i++)
		for(j=0; j&lt;blocks[i].size(); j++)
			if(block==blocks[i][j])
				return i;
}

void returning(int a)
{
	int i, index;
	
	index=find_block(a);
	for(i=blocks[index].size()-1; blocks[index][i]!=a; i--)
	{
		blocks[blocks[index][i]].push_back(blocks[index][i]);
		blocks[index].pop_back();
	}
}

void move()
{
	int a, b;
	int index_a, index_b;
	char option[5];
	
	scanf(" %d %s %d", &amp;a, option, &amp;b);

	index_a=find_block(a);
	index_b=find_block(b);

	if(index_a == index_b)
		return;

	if(a==b)
		return;
	if( strcmp(option, "onto")==0 )
	{
		returning(b);
	}	
	returning(a);
	
	blocks[index_b].push_back(blocks[index_a][blocks[index_a].size()-1]);
	blocks[index_a].pop_back();
}

void pile()
{
	int a, b;
	int index_a, index_b, i;
	char option[5];
	vector&lt;int&gt; tmp;
	
	scanf(" %d %s %d", &amp;a, option, &amp;b);

	index_a=find_block(a);
	index_b=find_block(b);

	if(index_a == index_b)
		return;

	if( strcmp(option, "onto")==0 )
	{
		returning(b);
	}
	
	for(i=blocks[index_a].size()-1; ; i--)//
	{
		tmp.push_back(blocks[index_a][i]);
		blocks[index_a].pop_back();
		if(tmp[tmp.size()-1]==a)
			break;
	}
	for(i=tmp.size()-1; tmp.empty()==0; i--)//
	{
		blocks[index_b].push_back(tmp[i]);
		tmp.pop_back();
	}
}

int get_com()
{
	char com[5];
	
	scanf("%s", com);
	if( strcmp(com, "quit")==0 )
		return 0;
	
	else if( strcmp(com, "move")==0 )
		move();
	else
		pile();
	return 1;
}

void print()
{
	int i,j;
	for(i=0; i&lt;n; i++)
	{
		printf("%d:",i);
		for(j=0; j&lt;blocks[i].size(); j++)
		{
			printf(" %d",blocks[i][j]);
		}
		printf("\n");
	}
}

int main()
{
	scanf("%d",&amp;n);

	init();	
	while( get_com() );
	print();
}
&lt;/textarea&gt;&lt;div class="entry-ccl" style="clear: both; text-align: right; margin-bottom: 10px"&gt;
	&lt;img id="ccl-icon-442-0" class="entry-ccl-by" src="http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black01.png" alt="저작자 표시"/&gt;
	&lt;img id="ccl-icon-442-1" class="entry-ccl-nc" src="http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black02.png" alt="비영리"/&gt;
	&lt;img id="ccl-icon-442-2" class="entry-ccl-nd" src="http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black03.png" alt="변경 금지"/&gt;
	&lt;!--
	&lt;rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"&gt;
		&lt;Work rdf:about=""&gt;
			&lt;license rdf:resource="http://creativecommons.org/licenses/by-nc-nd/2.0/kr/" /&gt;
		&lt;/Work&gt;
		&lt;License rdf:about="http://creativecommons.org/licenses/by-nc-nd/"&gt;
			&lt;permits rdf:resource="http://web.resource.org/cc/Reproduction"/&gt;
			&lt;permits rdf:resource="http://web.resource.org/cc/Distribution"/&gt;
			&lt;requires rdf:resource="http://web.resource.org/cc/Notice"/&gt;
			&lt;requires rdf:resource="http://web.resource.org/cc/Attribution"/&gt;
			&lt;prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/&gt;
		&lt;/License&gt;
	&lt;/rdf:RDF&gt;
	--&gt;
&lt;/div&gt;
&lt;div class="tt-plugin tt-share-entry-with-sns tt-sns-icon-alignment-right tt-sns-icon-size-small"&gt;
	&lt;div class="tt-sns-wrap" id="ttSnsWrap-"&gt;
		&lt;ul class="tt-sns-service-default"&gt;
			&lt;li class="tt-sns-service-mypeople"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('mypeople', '', '');"&gt;마이피플&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-twitter"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('twitter', '', '');"&gt;트위터&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-facebook"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('facebook', '', '');"&gt;페이스북&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-other"&gt;&lt;a href="javascript:;" onmouseover="ShareEntryWithSNS.showLayer(event, '');" onmouseout="ShareEntryWithSNS.hideLayer(event, '');"&gt;더보기&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
		&lt;ul class="tt-sns-service-more" id="ttSnsServiceMore-" onmouseout="ShareEntryWithSNS.hideLayer(event, '');"&gt;
			&lt;li class="tt-sns-service-me2day"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('me2day', '', '');"&gt;미투데이&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-yozm"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('yozm', '', '');"&gt;요즘&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/div&gt;
	&lt;div class="tt-sns-clear"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style="text-align:right; padding-top:10px;"&gt;
&lt;iframe src="http://www.facebook.com/plugins/like.php?href=zfanta.com/442&amp;amp;layout=button_count&amp;amp;show_faces=true&amp;amp;width=90&amp;amp;action=like&amp;amp;font=tahoma&amp;amp;colorscheme=light&amp;amp;height=65" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:65px;" allowTransparency="true"&gt;&lt;/iframe&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/zfanta/~4/atj-4uc_Wa8" height="1" width="1"/&gt;</description>
			<category>algorithm</category>
			<category>UVA</category>
			<category>프로그래밍</category>
			<author>　환타</author>
			<guid isPermaLink="false">http://zfanta.com/442</guid>
			<comments>http://zfanta.com/entry/UVa-101-The-Blocks-Problem-%EB%B2%88%EC%97%AD#entry442comment</comments>
			<pubDate>Thu, 26 Feb 2009 19:48:54 +0900</pubDate>
		<feedburner:origLink>http://zfanta.com/442</feedburner:origLink></item>
		<item>
			<title>아... 소멸자가 사람 잡아요.</title>
			<link>http://feedproxy.google.com/~r/zfanta/~3/YZWnjwkhMno/440</link>
			<description>&lt;textarea class="c" name="code" style="margin-left: 0px; margin-right: 0px; width: 100%; margin-top: 1px; margin-bottom: 1px; height: 3060px; "&gt;
#include &lt;iostream&gt;

class bigfloat
{
private:
	char *arr;
	char sign;
	int leninte, lendeci, lenwh;

public:
	bigfloat();
	~bigfloat();
	void operator = (char *);
	void operator = (double);
	void operator = (bigfloat &amp;);
	void print();

	friend bigfloat operator + (bigfloat &amp;, bigfloat &amp;);
};

bigfloat::bigfloat()
{
	arr=new char[1];
	arr[0]=0;
	sign='+';
	lenwh=leninte=1;
	lendeci=0;
}

bigfloat::~bigfloat()
{
	delete []arr;
	std::cout&lt;&lt;"소멸자"&lt;&lt;std::endl;
}

void bigfloat::operator = (char *tmp)
{
	int i, last, flagdeci=0, ind_arr;
	char *string;

	last=strlen(tmp);

	string=new char[last+1];
	memcpy(string,tmp,sizeof(char)*last+1);


	if(string[0] == '+' || string[0] == '-')	//부호제거
	{
		sign=string[0];
		for(i=0; i&lt;last; i++)
			string[i]=string[i+1];
		last--;
	}

	for(i=0; i&lt;last; i++)
	{
		if(string[i]=='.')						//.있으면
		{
			flagdeci=1;
			break;
		}
	}

	if(flagdeci)
	{
		for(i=last-1; string[i]=='0'; i--)		//0제거
		{
			string[i]='\0';
		}
		if(string[i]=='.')
			string[i]='\0';
	}

	for(i=0; string[i]!='.' &amp;&amp; string[i]!='\0'; i++);
	leninte=i;

	if(flagdeci)
		i++;

	for(; string[i]!='\0'; i++);
	lendeci = i - (leninte+flagdeci);
	lenwh = leninte + lendeci;

	delete []arr;
	arr=new char[lenwh];

	ind_arr=i=0;
	while(string[i]!='\0')
	{
		arr[ind_arr++]=string[i++]-'0';
		if(string[i]=='.')
			i++;
	}
}

void bigfloat::operator = (double a)
{
	char string[512];
	sprintf(string,"%lf",a);
	*this=string;
}



void bigfloat::operator = (bigfloat &amp;src)
{
	this-&gt;lendeci = src.lendeci;
	this-&gt;leninte = src.leninte;
	this-&gt;lenwh   = src.lenwh;
	if(arr)
	delete []this-&gt;arr;
	this-&gt;arr = new char[this-&gt;lenwh];
	memcpy(this-&gt;arr, src.arr, sizeof(char) * this-&gt;lenwh);
}
void bigfloat::print()
{
	int i;
	for(i=0; i&lt;lenwh; i++)
	{
		if(i==leninte)
			printf(".");
		printf("%d",arr[i]);
	}
	printf("\nsign:%c\nlenwh:%d\nleninte:%d\nlendeci:%d",sign,lenwh,leninte,lendeci);
	printf("\n\n");

}
bigfloat operator + (bigfloat &amp;first, bigfloat &amp;second)
{
	int lennew, point, ind_result, ind_shorter, i, j, hi, flag;
	char *result, *string;
	bigfloat toreturn;

	bigfloat &amp;longer=(first.leninte &gt; second.leninte)?first:second;
	bigfloat &amp;shorter=(first.leninte &lt;= second.leninte)?first:second;

	lennew = point = (first.leninte &gt; second.leninte)?first.leninte:second.leninte;
	lennew += (first.lendeci &gt; second.lendeci)?first.lendeci:second.lendeci;

	result = new char[lennew+1];
	memset(result, 0, sizeof(char) * (lennew + 1));
	memcpy(result+1, longer.arr, sizeof(char) * longer.lenwh);
	
	if(shorter.lendeci &gt; longer.lendeci)
		ind_result=lennew;
	else
		ind_result=lennew - (longer.lendeci - shorter.lendeci);
	ind_shorter=shorter.lenwh-1;

	while(ind_shorter &gt;= 0)
	{
		result[ind_result] += shorter.arr[ind_shorter];

		for(i = ind_result; result[i]&gt;=10; i--)
		{
			hi = result[i] / 10;
			result[i] %= 10;
			result[i-1] += hi;
		}
		ind_result--;
		ind_shorter--;
	}

	flag=0;

	if(result[0] != 0)
		flag=1;

	string = new char[lennew + 1 + flag + 1];
	string[point + flag] = '.';
	i = 1 - flag;
	j=0;

	while(j &lt; lennew + flag +1)
	{
		string[j++] = result[i++] + '0';
		if(string[j]=='.')
			j++;
	}
	string[j]='\0';

	toreturn=string;
	delete []result;
	delete []string;

	return toreturn;
}

int main()
{
	bigfloat a, b, c;
 	char aa[100], bb[100];

	scanf("%s %s",aa,bb);

	a=aa;
	b=bb;

	(a+b).print();
	
	return 0;
}

&lt;/textarea&gt;&lt;div&gt;
&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: -webkit-monospace; font-size: 13px; line-height: normal;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: -webkit-monospace; font-size: 13px; line-height: normal;"&gt;(a+b)에 리턴한 거 대입하기 전에 소멸자가 호출되잖아 흐흔으ㅡㅏㄴ머흠녘ㅁ&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: -webkit-monospace; font-size: 13px; line-height: normal;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div class="imageblock" style="display:inline;"&gt;&lt;a href="http://cfs11.tistory.com/original/33/tistory/2009/02/15/21/39/49980ce6732c8" rel="lightbox" target="_blank"&gt;&lt;img src="http://cfs11.tistory.com/image/33/tistory/2009/02/15/21/39/49980ce6732c8" alt="" filemime="" filename="개밥털이.jpg" height="375" width="400"/&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: -webkit-monospace; font-size: 13px; line-height: normal;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
지금 기분.jpg&lt;/div&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: -webkit-monospace; font-size: 13px; line-height: normal;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: -webkit-monospace; font-size: 13px; line-height: normal;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: -webkit-monospace; font-size: 13px; line-height: normal;"&gt;20분만에 추가한 해결책&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: -webkit-monospace; font-size: 13px; line-height: normal;"&gt;깊은 복사생성자만 만들어주면 됩니다.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: -webkit-monospace; font-size: 13px; line-height: normal;"&gt;
&lt;textarea class="c" name="code" style="margin-top: 1px; margin-bottom: 1px; height: 148px; margin-left: 0px; margin-right: 0px; width: 473px; "&gt;
bigfloat::bigfloat(bigfloat &amp;src)
{
	this-&gt;sign    = src.sign;
	this-&gt;lendeci = src.lendeci;
	this-&gt;leninte = src.leninte;
	this-&gt;lenwh   = src.lenwh;
	this-&gt;arr     = new char[this-&gt;lenwh];
	memcpy(this-&gt;arr, src.arr, sizeof(char) * this-&gt;lenwh);
}
&lt;/textarea&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: -webkit-monospace; font-size: 13px; line-height: normal;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: -webkit-monospace; font-size: 13px; line-height: normal;"&gt;아 왜, 깊은 복사생성자를 만든다는 게 깊은 대입연산자만 만들었을까.....&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0); font-size: 13px; line-height: 20px;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: -webkit-monospace; font-size: 13px; line-height: normal;"&gt;&lt;span class="Apple-style-span" style="font-family: 굴림; line-height: 20px; "&gt;클래스변수를 리턴하는 함수는 리턴을 위한 클래스를 따로 만든다는 사실 하나 배웠네요.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0); font-size: 13px; line-height: 20px;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div class="imageblock" style="display:inline;"&gt;&lt;a href="http://cfs13.tistory.com/original/32/tistory/2009/02/15/22/32/4998198a69492" rel="lightbox" target="_blank"&gt;&lt;img src="http://cfs13.tistory.com/image/32/tistory/2009/02/15/22/32/4998198a69492" alt="" filemime="" filename="삽질.jpg" height="540" width="720"/&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0); font-size: 13px; line-height: 20px;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
오랜만에 유용했던 삽질.jpg&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
ps. 고마워요 &lt;a href="http://bab2min.tistory.com/" target="_blank" title="[http://bab2min.tistory.com/]로 이동합니다."&gt;적분형님&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
      PG어 경배합니다.&lt;/div&gt;&lt;div class="entry-ccl" style="clear: both; text-align: right; margin-bottom: 10px"&gt;
	&lt;img id="ccl-icon-440-0" class="entry-ccl-by" src="http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black01.png" alt="저작자 표시"/&gt;
	&lt;img id="ccl-icon-440-1" class="entry-ccl-nc" src="http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black02.png" alt="비영리"/&gt;
	&lt;!--
	&lt;rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"&gt;
		&lt;Work rdf:about=""&gt;
			&lt;license rdf:resource="http://creativecommons.org/licenses/by-nc-fr/2.0/kr/" /&gt;
		&lt;/Work&gt;
		&lt;License rdf:about="http://creativecommons.org/licenses/by-nc-fr/"&gt;
			&lt;permits rdf:resource="http://web.resource.org/cc/Reproduction"/&gt;
			&lt;permits rdf:resource="http://web.resource.org/cc/Distribution"/&gt;
			&lt;requires rdf:resource="http://web.resource.org/cc/Notice"/&gt;
			&lt;requires rdf:resource="http://web.resource.org/cc/Attribution"/&gt;
			&lt;prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/&gt;
		&lt;/License&gt;
	&lt;/rdf:RDF&gt;
	--&gt;
&lt;/div&gt;
&lt;div class="tt-plugin tt-share-entry-with-sns tt-sns-icon-alignment-right tt-sns-icon-size-small"&gt;
	&lt;div class="tt-sns-wrap" id="ttSnsWrap-"&gt;
		&lt;ul class="tt-sns-service-default"&gt;
			&lt;li class="tt-sns-service-mypeople"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('mypeople', '', '');"&gt;마이피플&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-twitter"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('twitter', '', '');"&gt;트위터&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-facebook"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('facebook', '', '');"&gt;페이스북&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-other"&gt;&lt;a href="javascript:;" onmouseover="ShareEntryWithSNS.showLayer(event, '');" onmouseout="ShareEntryWithSNS.hideLayer(event, '');"&gt;더보기&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
		&lt;ul class="tt-sns-service-more" id="ttSnsServiceMore-" onmouseout="ShareEntryWithSNS.hideLayer(event, '');"&gt;
			&lt;li class="tt-sns-service-me2day"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('me2day', '', '');"&gt;미투데이&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-yozm"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('yozm', '', '');"&gt;요즘&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/div&gt;
	&lt;div class="tt-sns-clear"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style="text-align:right; padding-top:10px;"&gt;
&lt;iframe src="http://www.facebook.com/plugins/like.php?href=zfanta.com/440&amp;amp;layout=button_count&amp;amp;show_faces=true&amp;amp;width=90&amp;amp;action=like&amp;amp;font=tahoma&amp;amp;colorscheme=light&amp;amp;height=65" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:65px;" allowTransparency="true"&gt;&lt;/iframe&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/zfanta/~4/YZWnjwkhMno" height="1" width="1"/&gt;</description>
			<category>C/C++</category>
			<category>소멸자</category>
			<author>　환타</author>
			<guid isPermaLink="false">http://zfanta.com/440</guid>
			<comments>http://zfanta.com/entry/%EC%95%84-%EC%86%8C%EB%A9%B8%EC%9E%90%EA%B0%80-%EC%82%AC%EB%9E%8C-%EC%9E%A1%EC%95%84%EC%9A%94#entry440comment</comments>
			<pubDate>Sun, 15 Feb 2009 21:39:23 +0900</pubDate>
		<feedburner:origLink>http://zfanta.com/440</feedburner:origLink></item>
		<item>
			<title>C언어 스도쿠 자동풀이 프로그램</title>
			<link>http://feedproxy.google.com/~r/zfanta/~3/8Pe36kH_FwM/439</link>
			<description>&lt;div&gt;
&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: -webkit-monospace; font-size: 13px; line-height: normal;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: -webkit-monospace; font-size: 13px; line-height: normal;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: left; "&gt;&lt;span class="Apple-style-span" style="line-height: normal; "&gt;프로그램 다운로드&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: left; "&gt;&lt;div class="imageblock" style="display:inline;"&gt;&lt;a href="http://zfanta.tistory.com/attachment/498ff4bf00d04CN.zip"&gt;&lt;img src="http://i1.daumcdn.net/cfs.tistory/v/0/blog/image/extension/zip.gif" alt="" style="vertical-align: middle;" /&gt; 스도쿠.zip&lt;/a&gt;&lt;/div&gt;&lt;button class="txc-file " style="background-color: transparent; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; display: block; text-align: left; color: rgb(51, 51, 51); font-size: 12px; font-family: 굴림, gulim, sans-serif; margin-top: 3px; margin-right: 0pt; margin-bottom: 6px; margin-left: 0pt; "&gt;&lt;br /&gt;
&lt;/button&gt;&lt;/div&gt;
&lt;textarea class="c" name="code" style="margin-left: 0px; margin-right: 0px; width: 100%; margin-top: 1px; margin-bottom: 1px; height: 2817px; "&gt;
#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;memory.h&gt;


int table[9][9];	//입력한 스도쿠 저장
int completed=0;	//완성된 스도쿠 갯수 저장
FILE *out;

typedef struct This		//빈칸을 가리키는 연결리스트
{
	int y,x;			//y행, x열 좌표
	int cand[10];		//후보숫자 표시배열
	struct This *next;	//다음칸
}blank;

blank *head, *tail;

//끝났는지 확인
int end()
{
	int i,j;

	for(i=0; i&lt;9; i++)
		for(j=0; j&lt;9; j++)
			if(table[i][j]==0)	//빈 칸이 있으면
				return 0;		//0리턴
	return 1;
}

//입력
int input()
{
	int i,j;
	FILE *in=fopen("table.txt","r");

	if(in==NULL)
		return 0;

	for(i=0; i&lt;9; i++)
		for(j=0; j&lt;9; j++)
			fscanf(in," %1d",&amp;table[i][j]);
	fclose(in);
	return 1;
}

//출력
void output()
{
	int i,j;

	printf("%d 개 완성 더 만들어?\n입력따윈 ㅇ벗어 싫으면 그냥 꺼\n", ++completed);
	system("PAUSE");

	fprintf(out,"%d :\n", completed);		//완성햇던 스도쿠의 갰수 출력
	for(i=0; i&lt;9; i++, fprintf(out,"\n"))
		for(j=0; j&lt;9; j++)
			fprintf(out," %d",table[i][j]);
}

//y열에 쓸 수 있는 후보숫자를 a배열에 표시
void row(int y,int *a)
{
	int i;
	for(i=0; i&lt;9; i++)
		if(table[y][i]!=0)				//0이 아니면(이미 쓴 숫자면)
			a[table[y][i]]=0;			//a[쓰인 숫자]에 0(flase)표시
}

void col(int x,int *a)					//x열에 쓸 수 있는 후보숫자를 a배열에 표시
{
	int i;
	for(i=0; i&lt;9; i++)
		if(table[i][x]!=0)				//0이 아니면(이미 쓴 숫자면)
			a[table[i][x]]=0;			//a[쓰인 숫자]에 0(flase)표시
}

//y행, x열이 포함된 3x3영역 에 쓸 수 있는 후보숫자를 a배열에 표시
void big(int y, int x, int *a)
{
	int i,j;
	for(i=y; i&lt;y+3; i++)
		for(j=x; j&lt;x+3; j++)
			if(table[i][j]!=0)			//0이 아니면(이미 쓴 숫자면)
				a[table[i][j]]=0;		//a[쓰인 숫자]에 0(flase)표시
}

//a, b, c후보숫자 배열의 교집합부분을 구함
void samesame(int *a, int *b, int *c)
{
	int i;
	for(i=1; i&lt;=9;i++)
		a[i]=a[i]&amp;b[i]&amp;c[i];			//셋 다 1이면 1저장, 하나라도 0이면 0저장
}

//y행 x열칸에 쓸 수 있는 후보숫자를 구해 a에 표시
void get_cand(int y, int x, int *a)
{
	int i,j;
	int cand[3][10];
	for(i=0; i&lt;3; i++)					//여기부터
		for(j=0; j&lt;10; j++)				//
			cand[i][j]=1;				//여기까지 1로 초기화
	
	row(y,cand[0]);						//y행에 쓸 수 있는 후보숫자를 cand[0]배열에 저장
	col(x,cand[1]);						//x열에 쓸 수 있는 후보숫자를 cand[1]배열에 저장
	big((y/3)*3,(x/3)*3,cand[2]);		//y행, x열이 포함된 3x3영역 에 쓸 수 있는 후보숫자를 cand[0]배열에 저장
	samesame(cand[0],cand[1],cand[2]);	//위에서 구한 cand[0],cand[1],cand[2]배열의 교집합을 구해 cand[0]에 결과 저장
	memcpy(a,cand[0],sizeof(int)*10);	//a에 cand[0]복사
}

//빈 칸을 가리키는 연결리스트 생성
void set()
{
	int y, x;
	blank *temp;

	temp=(blank *)malloc(sizeof(blank));
	head=(blank *)malloc(sizeof(blank));
	tail=(blank *)malloc(sizeof(blank));
	temp=head;

	for(y=0; y&lt;9; y++)
	{
		for(x=0; x&lt;9; x++)
		{
			if(table[y][x]==0)		//빈 칸이면
			{
				temp-&gt;y=y;			//연결리스트에 저장하고
				temp-&gt;x=x;
				temp-&gt;next=(blank *)malloc(sizeof(blank));
				temp=temp-&gt;next;	//다음 연결리스트를 가리킴
			}
		}
	}
	tail=temp;
}

void solve(blank *node)
{
	int i;

	if(node==tail)		//끝까지 왔으면
	{
		if( end() )		//풀렸으면
			output();	//출력
		return;
	}


	get_cand(node-&gt;y,node-&gt;x,node-&gt;cand);	//후보숫자구함

	for(i=1; i&lt;=9; i++)
	{
		if(node-&gt;cand[i])					//쓸 수 있는 숫자면
		{
			table[node-&gt;y][node-&gt;x]=i;		//쓰고
			solve(node-&gt;next);				//다음칸으로 넘어감
			table[node-&gt;y][node-&gt;x]=0;		//다음 풀이에 영향을 주지 않기 위해 0으로 지움
		}
	}
}


int main()
{
	if( input()== 0)		//입력받고
	{
		printf("파일 입력 오류");
		return 0;
	}

	out=fopen("output.txt","w");
	set();				//빈칸 연결리스트생성
	solve(head);		//백트래킹으로 풀이
	fclose(out);

}
&lt;/textarea&gt;&lt;br /&gt;
&lt;div&gt;
&lt;div style="text-align: left;"&gt;
&lt;span class="Apple-style-span" style="line-height: normal;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: left;"&gt;
&lt;span class="Apple-style-span" style="line-height: normal;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: left;"&gt;
&lt;span class="Apple-style-span" style="line-height: normal;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: left;"&gt;
&lt;span class="Apple-style-span" style="line-height: normal;"&gt;프로그램 다운로드&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: left;"&gt;
&lt;div class="imageblock" style="display:inline;"&gt;&lt;a href="http://zfanta.tistory.com/attachment/498ff4bf00d04CN.zip"&gt;&lt;img src="http://i1.daumcdn.net/cfs.tistory/v/0/blog/image/extension/zip.gif" alt="" style="vertical-align: middle;" /&gt; 스도쿠.zip&lt;/a&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="line-height: normal;"&gt;&lt;div style="text-align: left;"&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div style="text-align: left;"&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div style="text-align: left;"&gt;
table.txt 파일에 스도쿠랑 똑같이 입력해주시면 됩니다. 빈칸은 0으로&lt;/div&gt;
&lt;div style="text-align: left;"&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div style="text-align: left;"&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div style="text-align: left;"&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div style="text-align: left;"&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div style="text-align: left;"&gt;
입력확인같은건안해요.&lt;/div&gt;
&lt;div style="text-align: left;"&gt;
5초이내에 안끝나면 잘못입력했는지 확인해보세요.&lt;/div&gt;
&lt;div style="text-align: left;"&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div class="entry-ccl" style="clear: both; text-align: right; margin-bottom: 10px"&gt;
	&lt;img id="ccl-icon-439-0" class="entry-ccl-by" src="http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black01.png" alt="저작자 표시"/&gt;
	&lt;img id="ccl-icon-439-1" class="entry-ccl-nc" src="http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black02.png" alt="비영리"/&gt;
	&lt;!--
	&lt;rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"&gt;
		&lt;Work rdf:about=""&gt;
			&lt;license rdf:resource="http://creativecommons.org/licenses/by-nc-fr/2.0/kr/" /&gt;
		&lt;/Work&gt;
		&lt;License rdf:about="http://creativecommons.org/licenses/by-nc-fr/"&gt;
			&lt;permits rdf:resource="http://web.resource.org/cc/Reproduction"/&gt;
			&lt;permits rdf:resource="http://web.resource.org/cc/Distribution"/&gt;
			&lt;requires rdf:resource="http://web.resource.org/cc/Notice"/&gt;
			&lt;requires rdf:resource="http://web.resource.org/cc/Attribution"/&gt;
			&lt;prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/&gt;
		&lt;/License&gt;
	&lt;/rdf:RDF&gt;
	--&gt;
&lt;/div&gt;
&lt;div class="tt-plugin tt-share-entry-with-sns tt-sns-icon-alignment-right tt-sns-icon-size-small"&gt;
	&lt;div class="tt-sns-wrap" id="ttSnsWrap-"&gt;
		&lt;ul class="tt-sns-service-default"&gt;
			&lt;li class="tt-sns-service-mypeople"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('mypeople', '', '');"&gt;마이피플&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-twitter"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('twitter', '', '');"&gt;트위터&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-facebook"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('facebook', '', '');"&gt;페이스북&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-other"&gt;&lt;a href="javascript:;" onmouseover="ShareEntryWithSNS.showLayer(event, '');" onmouseout="ShareEntryWithSNS.hideLayer(event, '');"&gt;더보기&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
		&lt;ul class="tt-sns-service-more" id="ttSnsServiceMore-" onmouseout="ShareEntryWithSNS.hideLayer(event, '');"&gt;
			&lt;li class="tt-sns-service-me2day"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('me2day', '', '');"&gt;미투데이&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-yozm"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('yozm', '', '');"&gt;요즘&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/div&gt;
	&lt;div class="tt-sns-clear"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="blogger-news-widget" style="width: 100%; text-align: center"&gt;
		  					&lt;embed src="http://api.v.daum.net/static/recombox1.swf" quality="high" flashvars="nid=2512122" allowscriptaccess="always" allowfullscreen="false" bgcolor="#ffffff" width="400" height="80" type="application/x-shockwave-flash" wmode="transparent"&gt;&lt;/embed&gt;
						&lt;/div&gt;&lt;div style="text-align:right; padding-top:10px;"&gt;
&lt;iframe src="http://www.facebook.com/plugins/like.php?href=zfanta.com/439&amp;amp;layout=button_count&amp;amp;show_faces=true&amp;amp;width=90&amp;amp;action=like&amp;amp;font=tahoma&amp;amp;colorscheme=light&amp;amp;height=65" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:65px;" allowTransparency="true"&gt;&lt;/iframe&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/zfanta/~4/8Pe36kH_FwM" height="1" width="1"/&gt;</description>
			<category>C/C++</category>
			<category>스도쿠</category>
			<category>프로그램</category>
			<author>　환타</author>
			<guid isPermaLink="false">http://zfanta.com/439</guid>
			<comments>http://zfanta.com/entry/C%EC%96%B8%EC%96%B4-%EC%8A%A4%EB%8F%84%EC%BF%A0-%EC%9E%90%EB%8F%99%ED%92%80%EC%9D%B4-%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%A8#entry439comment</comments>
			<pubDate>Mon, 09 Feb 2009 18:20:57 +0900</pubDate>
		<feedburner:origLink>http://zfanta.com/439</feedburner:origLink></item>
		<item>
			<title>웹페이지 오른쪽 마우스 클릭방지 해제 스크립트</title>
			<link>http://feedproxy.google.com/~r/zfanta/~3/WCH_dQZ4AI0/436</link>
			<description>&lt;span class="Apple-style-span" style="color: rgb(51, 51, 51);"&gt;&lt;div&gt;
즐겨찾기에 추가하고 사용하세요.&lt;/div&gt;
&lt;div&gt;이게 제일 확실한 것 같아요&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;/div&gt;
javascript:function r(d){d.oncontextmenu=null;d.onselectstart=null;d.ondragstart=null;d.onkeydown=null;d.onmousedown=null; d.body.oncontextmenu=null;d.body.onselectstart=null;d.body.ondragstart=null;d.body.onkeydown=null; d.body.onmousedown=null;};function unify(w){r(w.document);if(w.frames.length&gt;0){for(var i=0;i&amp;lt;w.frames.length;i++){try{unify(w.frames[i].window);}catch(e){}};};}; unify(self);&lt;/span&gt;&lt;div&gt;
&lt;span class="Apple-style-span" style="color: rgb(51, 51, 51);"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="color: rgb(51, 51, 51);"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="color: rgb(51, 51, 51);"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="color: rgb(51, 51, 51);"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;

&lt;textarea name="code" class="jscript" style="margin-left: 0px; margin-right: 0px; width: 646px; margin-top: 1px; margin-bottom: 1px; height: 517px; "&gt;
javascript:
function r(d)
{
	d.oncontextmenu=null;
	d.onselectstart=null;
	d.ondragstart=null;
	d.onkeydown=null;
	d.onmousedown=null;
	d.body.oncontextmenu=null;
	d.body.onselectstart=null;
	d.body.ondragstart=null;
	d.body.onkeydown=null;
	d.body.onmousedown=null;
};

function unify(w)
{
	r(w.document);
	if(w.frames.length&gt;0)
	{
		for(var i=0;i&lt;w.frames.length;i++)
		{
			try
			{
				unify(w.frames[i].window);
			}
			catch(e)
			{
			}
		};
	};
}; 
unify(self);
&lt;/textarea&gt;&lt;div class="entry-ccl" style="clear: both; text-align: right; margin-bottom: 10px"&gt;
	&lt;img id="ccl-icon-436-0" class="entry-ccl-by" src="http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black01.png" alt="저작자 표시"/&gt;
	&lt;img id="ccl-icon-436-1" class="entry-ccl-nc" src="http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black02.png" alt="비영리"/&gt;
	&lt;!--
	&lt;rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"&gt;
		&lt;Work rdf:about=""&gt;
			&lt;license rdf:resource="http://creativecommons.org/licenses/by-nc-fr/2.0/kr/" /&gt;
		&lt;/Work&gt;
		&lt;License rdf:about="http://creativecommons.org/licenses/by-nc-fr/"&gt;
			&lt;permits rdf:resource="http://web.resource.org/cc/Reproduction"/&gt;
			&lt;permits rdf:resource="http://web.resource.org/cc/Distribution"/&gt;
			&lt;requires rdf:resource="http://web.resource.org/cc/Notice"/&gt;
			&lt;requires rdf:resource="http://web.resource.org/cc/Attribution"/&gt;
			&lt;prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/&gt;
		&lt;/License&gt;
	&lt;/rdf:RDF&gt;
	--&gt;
&lt;/div&gt;
&lt;div class="tt-plugin tt-share-entry-with-sns tt-sns-icon-alignment-right tt-sns-icon-size-small"&gt;
	&lt;div class="tt-sns-wrap" id="ttSnsWrap-"&gt;
		&lt;ul class="tt-sns-service-default"&gt;
			&lt;li class="tt-sns-service-mypeople"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('mypeople', '', '');"&gt;마이피플&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-twitter"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('twitter', '', '');"&gt;트위터&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-facebook"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('facebook', '', '');"&gt;페이스북&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-other"&gt;&lt;a href="javascript:;" onmouseover="ShareEntryWithSNS.showLayer(event, '');" onmouseout="ShareEntryWithSNS.hideLayer(event, '');"&gt;더보기&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
		&lt;ul class="tt-sns-service-more" id="ttSnsServiceMore-" onmouseout="ShareEntryWithSNS.hideLayer(event, '');"&gt;
			&lt;li class="tt-sns-service-me2day"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('me2day', '', '');"&gt;미투데이&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-yozm"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('yozm', '', '');"&gt;요즘&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/div&gt;
	&lt;div class="tt-sns-clear"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="blogger-news-widget" style="width: 100%; text-align: center"&gt;
		  					&lt;embed src="http://api.v.daum.net/static/recombox1.swf" quality="high" flashvars="nid=2445757" allowscriptaccess="always" allowfullscreen="false" bgcolor="#ffffff" width="400" height="80" type="application/x-shockwave-flash" wmode="transparent"&gt;&lt;/embed&gt;
						&lt;/div&gt;&lt;div style="text-align:right; padding-top:10px;"&gt;
&lt;iframe src="http://www.facebook.com/plugins/like.php?href=zfanta.com/436&amp;amp;layout=button_count&amp;amp;show_faces=true&amp;amp;width=90&amp;amp;action=like&amp;amp;font=tahoma&amp;amp;colorscheme=light&amp;amp;height=65" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:65px;" allowTransparency="true"&gt;&lt;/iframe&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/zfanta/~4/WCH_dQZ4AI0" height="1" width="1"/&gt;</description>
			<category>정보 소식</category>
			<category>우클릭</category>
			<category>우클릭방지</category>
			<author>　환타</author>
			<guid isPermaLink="false">http://zfanta.com/436</guid>
			<comments>http://zfanta.com/entry/%EC%9B%B9%ED%8E%98%EC%9D%B4%EC%A7%80-%EC%98%A4%EB%A5%B8%EC%AA%BD-%EB%A7%88%EC%9A%B0%EC%8A%A4-%ED%81%B4%EB%A6%AD%EB%B0%A9%EC%A7%80-%ED%95%B4%EC%A0%9C-%EC%8A%A4%ED%81%AC%EB%A6%BD%ED%8A%B8#entry436comment</comments>
			<pubDate>Thu, 29 Jan 2009 16:54:18 +0900</pubDate>
		<feedburner:origLink>http://zfanta.com/436</feedburner:origLink></item>
		<item>
			<title>삼각형 넓이구하기 프로그래밍 - 헤론의 공식</title>
			<link>http://feedproxy.google.com/~r/zfanta/~3/hGoycczNAIA/430</link>
			<description>&lt;div&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
중학교에선 4,5,6의 세 변을 가진 삼각형넓이를 구할 땐&lt;/div&gt;
&lt;div&gt;
&lt;div class="imageblock left" style="float: left; margin-right: 10px;"&gt;&lt;a href="http://cfs12.tistory.com/original/22/tistory/2009/01/08/20/04/4965ddd090927" rel="lightbox" target="_blank"&gt;&lt;img src="http://cfs12.tistory.com/image/22/tistory/2009/01/08/20/04/4965ddd090927" alt="" filemime="" filename="18.jpg" height="344" width="314"/&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
h2 = 42 - (6-x)2 = 52 - x2&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
16 - (36 - 12x + x2) = 25 - x2&lt;/div&gt;
&lt;div&gt;
16 - 36 + 12x = 25&lt;/div&gt;
&lt;div&gt;
x = 15/4&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
h2 = 52 - x2&lt;/div&gt;
&lt;div&gt;
h2 = 400/16 - 225/16 = 175/16&lt;/div&gt;
&lt;div&gt;
h = &lt;span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: -webkit-monospace; font-size: 13px; line-height: normal; white-space: pre-wrap; "&gt;√175/4 = 5√7/4&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: -webkit-monospace; font-size: 13px; line-height: normal; white-space: pre-wrap;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: -webkit-monospace; font-size: 13px; line-height: normal; white-space: pre-wrap;"&gt;넓이 = 6 x 5√7/4 x 1/2&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: -webkit-monospace; font-size: 13px; line-height: normal; white-space: pre-wrap;"&gt;넓이 = 15√7/4&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
이런 방법을 알려줍니다.. 삼각형을 2개의 직각삼각형으로 나누어서 계산하는 것이죠.&lt;/div&gt;
&lt;div&gt;
참 싫죠?&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
헤론의 공식&lt;/div&gt;
&lt;div&gt;
&lt;div class="imageblock left" style="float: left; margin-right: 10px;"&gt;&lt;a href="http://cfs12.tistory.com/original/12/tistory/2009/01/08/20/10/4965df4021882" rel="lightbox" target="_blank"&gt;&lt;img src="http://cfs12.tistory.com/image/12/tistory/2009/01/08/20/10/4965df4021882" alt="" filemime="" filename="h.jpg" height="218" width="375"/&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: -webkit-monospace; font-size: 13px; line-height: normal; white-space: pre-wrap; "&gt;√{s(s-a)(s-b)(s-c)}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: -webkit-monospace; font-size: 13px; line-height: normal; white-space: pre-wrap;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: -webkit-monospace; font-size: 13px; line-height: normal; white-space: pre-wrap;"&gt;s = (a+b+c)/2&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: -webkit-monospace; font-size: 13px; line-height: normal; white-space: pre-wrap;"&gt;s = (4+5+6)/2 = 15/2&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: -webkit-monospace; font-size: 13px; line-height: normal; white-space: pre-wrap;"&gt;넓이 = √{(15/2)x(7/2)x(5/2)x(3/2)} = √(1575/16) = 15√7/4&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
참 쉽죠? s는 넓이가 아니라는거 조심하시고.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;textarea class="c" name="code" style="margin-left: 0px; margin-right: 0px; width: 562px; margin-top: 1px; margin-bottom: 1px; height: 1233px; "&gt;
#include &lt;stdio.h&gt;
#include &lt;math.h&gt;

void gettri()
{
	int a, b, c, tmp;
	int numer;			//분자
	int i, cnt;
	int x=1,y=1,z=4;	//(x√b)/z

	printf("입력(a b c) : ");
	scanf(" %d %d %d", &amp;a, &amp;b, &amp;c);
	if(a&gt;b)
	{
		tmp=a;
		a=b;
		b=tmp;
	}
	if(b&gt;c)
	{
		tmp=b;
		b=c;
		c=tmp;
	}
	if(a+b&lt;=c)
	{
		printf("삼각형이 아니잖아\n");
		return;
	}

	numer=(a+b+c) * (-a+b+c) * (a-b+c) * (a+b-c);

	i=2;
	while(numer!=1)			//소인수분해로 무리수를 a√b로
	{
		cnt=0;
		while(numer%i==0)
		{
			cnt++;
			numer/=i;
		}
		if((int)(cnt/2))
			x=x*pow(i,(int)(cnt/2));
		if(cnt%2)
			y=y*i;
		i++;
	}
	if(x%4==0)			//약분
	{
		x/=4;
		z=1;
	}
	else if(x%2==0)		//여기도 약분
	{
		x/=2;
		z=2;
	}

	if(y==1)
	{
		printf("%d",x);
	}
	else
	{
		if(x!=1)
			printf("%d",x);
		printf("√%d",y);
	}
	if(z!=1)
		printf("/%d",z);
	printf("\n");
}

main()
{
	while(1)
	{
		gettri();
	}

}&lt;/textarea&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: -webkit-monospace; font-size: 13px; line-height: normal;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div class="tt-plugin tt-share-entry-with-sns tt-sns-icon-alignment-right tt-sns-icon-size-small"&gt;
	&lt;div class="tt-sns-wrap" id="ttSnsWrap-"&gt;
		&lt;ul class="tt-sns-service-default"&gt;
			&lt;li class="tt-sns-service-mypeople"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('mypeople', '', '');"&gt;마이피플&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-twitter"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('twitter', '', '');"&gt;트위터&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-facebook"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('facebook', '', '');"&gt;페이스북&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-other"&gt;&lt;a href="javascript:;" onmouseover="ShareEntryWithSNS.showLayer(event, '');" onmouseout="ShareEntryWithSNS.hideLayer(event, '');"&gt;더보기&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
		&lt;ul class="tt-sns-service-more" id="ttSnsServiceMore-" onmouseout="ShareEntryWithSNS.hideLayer(event, '');"&gt;
			&lt;li class="tt-sns-service-me2day"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('me2day', '', '');"&gt;미투데이&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-yozm"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('yozm', '', '');"&gt;요즘&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/div&gt;
	&lt;div class="tt-sns-clear"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="blogger-news-widget" style="width: 100%; text-align: center"&gt;
		  					&lt;embed src="http://api.v.daum.net/static/recombox1.swf" quality="high" flashvars="nid=2332141" allowscriptaccess="always" allowfullscreen="false" bgcolor="#ffffff" width="400" height="80" type="application/x-shockwave-flash" wmode="transparent"&gt;&lt;/embed&gt;
						&lt;/div&gt;&lt;div style="text-align:right; padding-top:10px;"&gt;
&lt;iframe src="http://www.facebook.com/plugins/like.php?href=zfanta.com/430&amp;amp;layout=button_count&amp;amp;show_faces=true&amp;amp;width=90&amp;amp;action=like&amp;amp;font=tahoma&amp;amp;colorscheme=light&amp;amp;height=65" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:65px;" allowTransparency="true"&gt;&lt;/iframe&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/zfanta/~4/hGoycczNAIA" height="1" width="1"/&gt;</description>
			<category>algorithm</category>
			<category>도형</category>
			<category>삼각형</category>
			<category>프로그래밍</category>
			<category>헤론</category>
			<author>　환타</author>
			<guid isPermaLink="false">http://zfanta.com/430</guid>
			<comments>http://zfanta.com/entry/%EC%82%BC%EA%B0%81%ED%98%95-%EB%84%93%EC%9D%B4%EA%B5%AC%ED%95%98%EA%B8%B0-%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%B0%8D-%ED%97%A4%EB%A1%A0%EC%9D%98-%EA%B3%B5%EC%8B%9D#entry430comment</comments>
			<pubDate>Thu, 08 Jan 2009 20:17:48 +0900</pubDate>
		<feedburner:origLink>http://zfanta.com/430</feedburner:origLink></item>
		<item>
			<title>삼성 코딩스타일 가이드</title>
			<link>http://feedproxy.google.com/~r/zfanta/~3/p7RmQX5Re2I/426</link>
			<description>&lt;div class="imageblock" style="display:inline;"&gt;&lt;a href="http://zfanta.tistory.com/attachment/495c3b4f6ac82E2.pdf"&gt;&lt;img src="http://i1.daumcdn.net/cfs.tistory/v/0/blog/image/extension/pdf.gif" alt="" style="vertical-align: middle;" /&gt; SamSungCodingStyle.pdf&lt;/a&gt;&lt;/div&gt;&lt;object type="application/pdf" data="/attachment/495c3b4f6ac82E2.pdf" width="720" height="800"&gt;&lt;param name="src" value="/attachment/495c3b4f6ac82E2.pdf"&gt;&lt;/object&gt;&lt;br /&gt;

&lt;div&gt;
&lt;div class="imageblock" style="display:inline;"&gt;&lt;a href="http://zfanta.tistory.com/attachment/495c3b4f6ac82E2.pdf"&gt;&lt;img src="http://i1.daumcdn.net/cfs.tistory/v/0/blog/image/extension/pdf.gif" alt="" style="vertical-align: middle;" /&gt; SamSungCodingStyle.pdf&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
이런거 신경쓰면서 Anycall PC Manager는 그따우로 만드나요?????????????????????????????????????&lt;/div&gt;
&lt;div&gt;
&lt;div class="imageblock" style="display:inline;"&gt;&lt;a href="http://cfs14.tistory.com/original/22/tistory/2009/01/01/12/59/495c3f8663960" rel="lightbox" target="_blank"&gt;&lt;img src="http://cfs14.tistory.com/image/22/tistory/2009/01/01/12/59/495c3f8663960" alt="" filemime="" filename="건희.jpg" height="5805" width="487"/&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="tt-plugin tt-share-entry-with-sns tt-sns-icon-alignment-right tt-sns-icon-size-small"&gt;
	&lt;div class="tt-sns-wrap" id="ttSnsWrap-"&gt;
		&lt;ul class="tt-sns-service-default"&gt;
			&lt;li class="tt-sns-service-mypeople"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('mypeople', '', '');"&gt;마이피플&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-twitter"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('twitter', '', '');"&gt;트위터&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-facebook"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('facebook', '', '');"&gt;페이스북&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-other"&gt;&lt;a href="javascript:;" onmouseover="ShareEntryWithSNS.showLayer(event, '');" onmouseout="ShareEntryWithSNS.hideLayer(event, '');"&gt;더보기&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
		&lt;ul class="tt-sns-service-more" id="ttSnsServiceMore-" onmouseout="ShareEntryWithSNS.hideLayer(event, '');"&gt;
			&lt;li class="tt-sns-service-me2day"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('me2day', '', '');"&gt;미투데이&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-yozm"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('yozm', '', '');"&gt;요즘&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/div&gt;
	&lt;div class="tt-sns-clear"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style="text-align:right; padding-top:10px;"&gt;
&lt;iframe src="http://www.facebook.com/plugins/like.php?href=zfanta.com/426&amp;amp;layout=button_count&amp;amp;show_faces=true&amp;amp;width=90&amp;amp;action=like&amp;amp;font=tahoma&amp;amp;colorscheme=light&amp;amp;height=65" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:65px;" allowTransparency="true"&gt;&lt;/iframe&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/zfanta/~4/p7RmQX5Re2I" height="1" width="1"/&gt;</description>
			<category>정보 소식</category>
			<category>삼성</category>
			<category>코딩스타일</category>
			<author>　환타</author>
			<guid isPermaLink="false">http://zfanta.com/426</guid>
			<comments>http://zfanta.com/entry/%EC%82%BC%EC%84%B1-%EC%BD%94%EB%94%A9%EC%8A%A4%ED%83%80%EC%9D%BC-%EA%B0%80%EC%9D%B4%EB%93%9C#entry426comment</comments>
			<pubDate>Thu, 01 Jan 2009 15:44:41 +0900</pubDate>
		<feedburner:origLink>http://zfanta.com/426</feedburner:origLink></item>
		<item>
			<title>비트연산자 활용 모음</title>
			<link>http://feedproxy.google.com/~r/zfanta/~3/q3tCCgjxKJY/425</link>
			<description>&lt;span class="Apple-style-span"&gt;&lt;table border="0" cellspacing="0" cellpadding="0" width="100%" style="table-layout: fixed; font-family: 굴림, Gulim, 돋움, Tahoma, Verdana, Arial, Helvetica; font-size: 9pt; line-height: 150%; "&gt;
&lt;col width="100%"&gt;&lt;tbody&gt;&lt;tr style="font-family: 굴림, Gulim, 돋움, Tahoma, Verdana, Arial, Helvetica; font-size: 9pt;  line-height: 150%; "&gt;
&lt;td valign="top" style="font-family: 굴림, Gulim, 돋움, Tahoma, Verdana, Arial, Helvetica; font-size: 9pt; line-height: 150%; "&gt;&lt;a href="http://graphics.stanford.edu/~seander/bithacks.html" target="_blank" style=" text-decoration: none; "&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span style="font-size: 36pt; "&gt;&lt;span style="font-size: 24pt; "&gt;&lt;span style="font-size: 18pt; "&gt;http://graphics.stanford.edu/~seander/bithacks.html&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Gulim; font-size: 16px; line-height: normal; "&gt;&lt;h3&gt;&lt;br /&gt;
&lt;/h3&gt;&lt;h3&gt;Contents&lt;/h3&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href="http://graphics.stanford.edu/~seander/bithacks.html#OperationCounting"&gt;About the operation counting methodology&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://graphics.stanford.edu/~seander/bithacks.html#CopyIntegerSign"&gt;Compute the sign of an integer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://graphics.stanford.edu/~seander/bithacks.html#IntegerAbs"&gt;Compute the integer absolute value (abs) without branching&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://graphics.stanford.edu/~seander/bithacks.html#IntegerMinOrMax"&gt;Compute the minimum (min) or maximum (max) of two integers without branching&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://graphics.stanford.edu/~seander/bithacks.html#DetermineIfPowerOf2"&gt;Determining if an integer is a power of 2&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Sign extending&lt;ul&gt;
&lt;li&gt;&lt;a href="http://graphics.stanford.edu/~seander/bithacks.html#FixedSignExtend"&gt;Sign extending from a constant bit width&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://graphics.stanford.edu/~seander/bithacks.html#VariableSignExtend"&gt;Sign extending from a variable bit-width&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://graphics.stanford.edu/~seander/bithacks.html#VariableSignExtendRisky"&gt;Sign extending from a variable bit-width in 3 operations&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="http://graphics.stanford.edu/~seander/bithacks.html#ConditionalSetOrClearBitsWithoutBranching"&gt;Conditionally set or clear bits without branching&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://graphics.stanford.edu/~seander/bithacks.html#MaskedMerge"&gt;Merge bits from two values according to a mask&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Counting bits set&lt;ul&gt;
&lt;li&gt;&lt;a href="http://graphics.stanford.edu/~seander/bithacks.html#CountBitsSetNaive"&gt;Counting bits set, naive way&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://graphics.stanford.edu/~seander/bithacks.html#CountBitsSetTable"&gt;Counting bits set by lookup table&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://graphics.stanford.edu/~seander/bithacks.html#CountBitsSetKernighan"&gt;Counting bits set, Brian Kernighan's way&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://graphics.stanford.edu/~seander/bithacks.html#CountBitsSet64"&gt;Counting bits set in 12, 24, or 32-bit words using 64-bit instructions&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://graphics.stanford.edu/~seander/bithacks.html#CountBitsSetParallel"&gt;Counting bits set, in parallel&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Computing parity (1 if an odd number of bits set, 0 otherwise)&lt;ul&gt;
&lt;li&gt;&lt;a href="http://graphics.stanford.edu/~seander/bithacks.html#ParityNaive"&gt;Compute parity of a word the naive way&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://graphics.stanford.edu/~seander/bithacks.html#ParityLookupTable"&gt;Compute parity by lookup table&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://graphics.stanford.edu/~seander/bithacks.html#ParityWith64Bits"&gt;Compute parity of a byte using 64-bit multiply and modulus division&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://graphics.stanford.edu/~seander/bithacks.html#ParityMultiply"&gt;Compute parity of word with a multiply&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://graphics.stanford.edu/~seander/bithacks.html#ParityParallel"&gt;Compute parity in parallel&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Swapping Values&lt;ul&gt;
&lt;li&gt;&lt;a href="http://graphics.stanford.edu/~seander/bithacks.html#SwappingValuesSubAdd"&gt;Swapping values with subtraction and addition&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://graphics.stanford.edu/~seander/bithacks.html#SwappingValuesXOR"&gt;Swapping values with XOR&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://graphics.stanford.edu/~seander/bithacks.html#SwappingBitsXOR"&gt;Swapping individual bits with XOR&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Reversing bit sequences&lt;ul&gt;
&lt;li&gt;&lt;a href="http://graphics.stanford.edu/~seander/bithacks.html#BitReverseObvious"&gt;Reverse bits the obvious way&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://graphics.stanford.edu/~seander/bithacks.html#BitReverseTable"&gt;Reverse bits in word by lookup table&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://graphics.stanford.edu/~seander/bithacks.html#ReverseByteWith64BitsDiv"&gt;Reverse the bits in a byte with 3 operations (64-bit muliply and modulus division)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://graphics.stanford.edu/~seander/bithacks.html#ReverseByteWith64Bits"&gt;Reverse the bits in a byte with 4 operations (64-bit multiply, no division)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://graphics.stanford.edu/~seander/bithacks.html#ReverseByteWith32Bits"&gt;Reverse the bits in a byte with 7 operations (no 64-bit, only 32)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://graphics.stanford.edu/~seander/bithacks.html#ReverseParallel"&gt;Reverse an N-bit quantity in parallel with 5 * lg(N) operations&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Modulus division (aka computing &lt;em&gt;remainders&lt;/em&gt;)&lt;ul&gt;
&lt;li&gt;&lt;a href="http://graphics.stanford.edu/~seander/bithacks.html#ModulusDivisionEasy"&gt;Computing modulus division by 1 &amp;lt;&amp;lt; s without a division operation (obvious)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://graphics.stanford.edu/~seander/bithacks.html#ModulusDivision"&gt;Computing modulus division by (1 &amp;lt;&amp;lt; s) - 1 without a division operation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://graphics.stanford.edu/~seander/bithacks.html#ModulusDivisionParallel"&gt;Computing modulus division by (1 &amp;lt;&amp;lt; s) - 1 in parallel without a division operation&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Finding integer log base 2 of an integer (aka the position of the highest bit set)&lt;ul&gt;
&lt;li&gt;&lt;a href="http://graphics.stanford.edu/~seander/bithacks.html#IntegerLogObvious"&gt;Find the log base 2 of an integer with the MSB N set in O(N) operations (the obvious way)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://graphics.stanford.edu/~seander/bithacks.html#IntegerLogIEEE64Float"&gt;Find the integer log base 2 of an integer with an 64-bit IEEE float&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://graphics.stanford.edu/~seander/bithacks.html#IntegerLogLookup"&gt;Find the log base 2 of an integer with a lookup table&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://graphics.stanford.edu/~seander/bithacks.html#IntegerLog"&gt;Find the log base 2 of an N-bit integer in O(lg(N)) operations&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://graphics.stanford.edu/~seander/bithacks.html#IntegerLogDeBruijn"&gt;Find the log base 2 of an N-bit integer in O(lg(N)) operations with multiply and lookup&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="http://graphics.stanford.edu/~seander/bithacks.html#IntegerLog10"&gt;Find integer log base 10 of an integer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://graphics.stanford.edu/~seander/bithacks.html#IntegerLog10Obvious"&gt;Find integer log base 10 of an integer the obvious way&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://graphics.stanford.edu/~seander/bithacks.html#IntegerLogFloat"&gt;Find integer log base 2 of a 32-bit IEEE float&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://graphics.stanford.edu/~seander/bithacks.html#IntegerLogRootFloat"&gt;Find integer log base 2 of the pow(2, r)-root of a 32-bit IEEE float (for unsigned integer r)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Counting consecutive trailing zero bits (or finding bit indices)&lt;ul&gt;
&lt;li&gt;&lt;a href="http://graphics.stanford.edu/~seander/bithacks.html#ZerosOnRightLinear"&gt;Count the consecutive zero bits (trailing) on the right linearly&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://graphics.stanford.edu/~seander/bithacks.html#ZerosOnRightParallel"&gt;Count the consecutive zero bits (trailing) on the right in parallel&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://graphics.stanford.edu/~seander/bithacks.html#ZerosOnRightBinSearch"&gt;Count the consecutive zero bits (trailing) on the right by binary search&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://graphics.stanford.edu/~seander/bithacks.html#ZerosOnRightFloatCast"&gt;Count the consecutive zero bits (trailing) on the right by casting to a float&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://graphics.stanford.edu/~seander/bithacks.html#ZerosOnRightModLookup"&gt;Count the consecutive zero bits (trailing) on the right with modulus division and lookup&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://graphics.stanford.edu/~seander/bithacks.html#ZerosOnRightMultLookup"&gt;Count the consecutive zero bits (trailing) on the right with multiply and lookup&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="http://graphics.stanford.edu/~seander/bithacks.html#RoundUpPowerOf2Float"&gt;Round up to the next highest power of 2 by float casting&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://graphics.stanford.edu/~seander/bithacks.html#RoundUpPowerOf2"&gt;Round up to the next highest power of 2&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Interleaving bits (aka computing &lt;em&gt;Morton Numbers&lt;/em&gt;)&lt;ul&gt;
&lt;li&gt;&lt;a href="http://graphics.stanford.edu/~seander/bithacks.html#InterleaveTableObvious"&gt;Interleave bits the obvious way&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://graphics.stanford.edu/~seander/bithacks.html#InterleaveTableLookup"&gt;Interleave bits by table lookup&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://graphics.stanford.edu/~seander/bithacks.html#Interleave64bitOps"&gt;Interleave bits with 64-bit multiply&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://graphics.stanford.edu/~seander/bithacks.html#InterleaveBMN"&gt;Interleave bits by Binary Magic Numbers&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Testing for ranges of bytes in a word (and counting occurances found)&lt;ul&gt;
&lt;li&gt;&lt;a href="http://graphics.stanford.edu/~seander/bithacks.html#ZeroInWord"&gt;Determine if a word has a zero byte&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://graphics.stanford.edu/~seander/bithacks.html#HasLessInWord"&gt;Determine if a word has byte less than n&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://graphics.stanford.edu/~seander/bithacks.html#HasMoreInWord"&gt;Determine if a word has a byte greater than n&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://graphics.stanford.edu/~seander/bithacks.html#HasBetweenInWord"&gt;Determine if a word has a byte between m and n&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/span&gt;&lt;span style="font-size: 18pt; "&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;a href="http://bits.stephan-brumme.com/" target="_blank" style="text-decoration: none; "&gt;http://bits.stephan-brumme.com/&lt;/a&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: rgb(51, 51, 51); font-family: Verdana; font-size: 12px; line-height: normal; "&gt;&lt;table style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td class="interlinks" style="font-family: inherit; font-size: 0.8em; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 5px; white-space: nowrap; vertical-align: top; "&gt;• February 11, 2007:&lt;/td&gt;
&lt;td class="interlinks" style="font-family: inherit; font-size: 0.8em; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 5px; white-space: nowrap; vertical-align: top; "&gt;&lt;a href="http://bits.stephan-brumme.com/sign.html" style="color: rgb(68, 85, 136); "&gt;Sign of a 32 bit integer&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="interlinks" style="font-family: inherit; font-size: 0.8em; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 5px; white-space: nowrap; vertical-align: top; "&gt;• February 11, 2007:&lt;/td&gt;
&lt;td class="interlinks" style="font-family: inherit; font-size: 0.8em; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 5px; white-space: nowrap; vertical-align: top; "&gt;&lt;a href="http://bits.stephan-brumme.com/invSquareRoot.html" style="color: rgb(68, 85, 136); "&gt;Float inverse square root approximation&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="interlinks" style="font-family: inherit; font-size: 0.8em; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 5px; white-space: nowrap; vertical-align: top; "&gt;• February 7, 2007:&lt;/td&gt;
&lt;td class="interlinks" style="font-family: inherit; font-size: 0.8em; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 5px; white-space: nowrap; vertical-align: top; "&gt;&lt;a href="http://bits.stephan-brumme.com/null.html" style="color: rgb(68, 85, 136); "&gt;Detects zero bytes inside a 32 bit integer&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="interlinks" style="font-family: inherit; font-size: 0.8em; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 5px; white-space: nowrap; vertical-align: top; "&gt;• January 31, 2007:&lt;/td&gt;
&lt;td class="interlinks" style="font-family: inherit; font-size: 0.8em; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 5px; white-space: nowrap; vertical-align: top; "&gt;&lt;a href="http://bits.stephan-brumme.com/minmax.html" style="color: rgb(68, 85, 136); "&gt;Minimum / maximum of integers&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="interlinks" style="font-family: inherit; font-size: 0.8em; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 5px; white-space: nowrap; vertical-align: top; "&gt;• January 31, 2007:&lt;/td&gt;
&lt;td class="interlinks" style="font-family: inherit; font-size: 0.8em; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 5px; white-space: nowrap; vertical-align: top; "&gt;&lt;a href="http://bits.stephan-brumme.com/absInteger.html" style="color: rgb(68, 85, 136); "&gt;Absolute value of an integer&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="interlinks" style="font-family: inherit; font-size: 0.8em; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 5px; white-space: nowrap; vertical-align: top; "&gt;• January 28, 2007:&lt;/td&gt;
&lt;td class="interlinks" style="font-family: inherit; font-size: 0.8em; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 5px; white-space: nowrap; vertical-align: top; "&gt;&lt;a href="http://bits.stephan-brumme.com/endianess.html" style="color: rgb(68, 85, 136); "&gt;Endianess&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="interlinks" style="font-family: inherit; font-size: 0.8em; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 5px; white-space: nowrap; vertical-align: top; "&gt;• January 28, 2007:&lt;/td&gt;
&lt;td class="interlinks" style="font-family: inherit; font-size: 0.8em; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 5px; white-space: nowrap; vertical-align: top; "&gt;&lt;a href="http://bits.stephan-brumme.com/roundUpToNextPowerOfTwo.html" style="color: rgb(68, 85, 136); "&gt;Round up to the next power of two&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="interlinks" style="font-family: inherit; font-size: 0.8em; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 5px; white-space: nowrap; vertical-align: top; "&gt;• January 28, 2007:&lt;/td&gt;
&lt;td class="interlinks" style="font-family: inherit; font-size: 0.8em; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 5px; white-space: nowrap; vertical-align: top; "&gt;&lt;a href="http://bits.stephan-brumme.com/lowestBitSet.html" style="color: rgb(68, 85, 136); "&gt;Position of lowest bit set&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="interlinks" style="font-family: inherit; font-size: 0.8em; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 5px; white-space: nowrap; vertical-align: top; "&gt;• February 11, 2007:&lt;/td&gt;
&lt;td class="interlinks" style="font-family: inherit; font-size: 0.8em; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 5px; white-space: nowrap; vertical-align: top; "&gt;&lt;a href="http://bits.stephan-brumme.com/inverse.html" style="color: rgb(68, 85, 136); "&gt;Approximative inverse of a float&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="interlinks" style="font-family: inherit; font-size: 0.8em; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 5px; white-space: nowrap; vertical-align: top; "&gt;• February 7, 2007:&lt;/td&gt;
&lt;td class="interlinks" style="font-family: inherit; font-size: 0.8em; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 5px; white-space: nowrap; vertical-align: top; "&gt;&lt;a href="http://bits.stephan-brumme.com/squareRoot.html" style="color: rgb(68, 85, 136); "&gt;Float square root approximation&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="interlinks" style="font-family: inherit; font-size: 0.8em; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 5px; white-space: nowrap; vertical-align: top; "&gt;• January 31, 2007:&lt;/td&gt;
&lt;td class="interlinks" style="font-family: inherit; font-size: 0.8em; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 5px; white-space: nowrap; vertical-align: top; "&gt;&lt;a href="http://bits.stephan-brumme.com/absFloat.html" style="color: rgb(68, 85, 136); "&gt;Absolute value of a float&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="interlinks" style="font-family: inherit; font-size: 0.8em; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 5px; white-space: nowrap; vertical-align: top; "&gt;• January 28, 2007:&lt;/td&gt;
&lt;td class="interlinks" style="font-family: inherit; font-size: 0.8em; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 5px; white-space: nowrap; vertical-align: top; "&gt;&lt;a href="http://bits.stephan-brumme.com/countBits.html" style="color: rgb(68, 85, 136); "&gt;Count bits set in parallel a.k.a. Population Count&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="interlinks" style="font-family: inherit; font-size: 0.8em; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 5px; white-space: nowrap; vertical-align: top; "&gt;• January 28, 2007:&lt;/td&gt;
&lt;td class="interlinks" style="font-family: inherit; font-size: 0.8em; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 5px; white-space: nowrap; vertical-align: top; "&gt;&lt;a href="http://bits.stephan-brumme.com/parity.html" style="color: rgb(68, 85, 136); "&gt;Parity&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="interlinks" style="font-family: inherit; font-size: 0.8em; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 5px; white-space: nowrap; vertical-align: top; "&gt;• January 28, 2007:&lt;/td&gt;
&lt;td class="interlinks" style="font-family: inherit; font-size: 0.8em; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 5px; white-space: nowrap; vertical-align: top; "&gt;&lt;a href="http://bits.stephan-brumme.com/isPowerOfTwo.html" style="color: rgb(68, 85, 136); "&gt;Is power of two&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;
네......................&lt;br /&gt;
영어입니다.&lt;br /&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/span&gt;&lt;div class="tt-plugin tt-share-entry-with-sns tt-sns-icon-alignment-right tt-sns-icon-size-small"&gt;
	&lt;div class="tt-sns-wrap" id="ttSnsWrap-"&gt;
		&lt;ul class="tt-sns-service-default"&gt;
			&lt;li class="tt-sns-service-mypeople"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('mypeople', '', '');"&gt;마이피플&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-twitter"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('twitter', '', '');"&gt;트위터&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-facebook"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('facebook', '', '');"&gt;페이스북&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-other"&gt;&lt;a href="javascript:;" onmouseover="ShareEntryWithSNS.showLayer(event, '');" onmouseout="ShareEntryWithSNS.hideLayer(event, '');"&gt;더보기&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
		&lt;ul class="tt-sns-service-more" id="ttSnsServiceMore-" onmouseout="ShareEntryWithSNS.hideLayer(event, '');"&gt;
			&lt;li class="tt-sns-service-me2day"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('me2day', '', '');"&gt;미투데이&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-yozm"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('yozm', '', '');"&gt;요즘&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/div&gt;
	&lt;div class="tt-sns-clear"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="blogger-news-widget" style="width: 100%; text-align: center"&gt;
		  					&lt;embed src="http://api.v.daum.net/static/recombox1.swf" quality="high" flashvars="nid=2276852" allowscriptaccess="always" allowfullscreen="false" bgcolor="#ffffff" width="400" height="80" type="application/x-shockwave-flash" wmode="transparent"&gt;&lt;/embed&gt;
						&lt;/div&gt;&lt;div style="text-align:right; padding-top:10px;"&gt;
&lt;iframe src="http://www.facebook.com/plugins/like.php?href=zfanta.com/425&amp;amp;layout=button_count&amp;amp;show_faces=true&amp;amp;width=90&amp;amp;action=like&amp;amp;font=tahoma&amp;amp;colorscheme=light&amp;amp;height=65" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:65px;" allowTransparency="true"&gt;&lt;/iframe&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/zfanta/~4/q3tCCgjxKJY" height="1" width="1"/&gt;</description>
			<category>C/C++</category>
			<category>비트연산</category>
			<category>비트연산자</category>
			<author>　환타</author>
			<guid isPermaLink="false">http://zfanta.com/425</guid>
			<comments>http://zfanta.com/entry/%EB%B9%84%ED%8A%B8%EC%97%B0%EC%82%B0%EC%9E%90-%ED%99%9C%EC%9A%A9-%EB%AA%A8%EC%9D%8C#entry425comment</comments>
			<pubDate>Mon, 29 Dec 2008 20:54:26 +0900</pubDate>
		<feedburner:origLink>http://zfanta.com/425</feedburner:origLink></item>
		<item>
			<title>아 다풀었다 ㅋㅋㅋㅋ</title>
			<link>http://feedproxy.google.com/~r/zfanta/~3/FBTleNqZH4k/415</link>
			<description>&lt;div class="imageblock" style="display:inline;"&gt;&lt;a href="http://cfs13.tistory.com/original/7/tistory/2008/10/26/22/08/49046bd79f649" rel="lightbox" target="_blank"&gt;&lt;img src="http://cfs13.tistory.com/image/7/tistory/2008/10/26/22/08/49046bd79f649" alt="" filemime="" filename="2008-10-2622;00;19.jpg" height="527" width="720"/&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;알고리즘 문제는 다풀었네요.&lt;br /&gt;
(근데 저 여자분은 누구???)&lt;br /&gt;
&lt;br /&gt;중간에 자료구조를 직접 만들어야하는 변태문제도 나오는데.....&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;div class="imageblock" style="display:inline;"&gt;&lt;a href="http://cfs13.tistory.com/original/20/tistory/2008/10/26/22/08/49046be124e0e" rel="lightbox" target="_blank"&gt;&lt;img src="http://cfs13.tistory.com/image/20/tistory/2008/10/26/22/08/49046be124e0e" alt="" filemime="" filename="최면.jpg" height="338" width="613"/&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
ㅂ2ㅂ2&lt;br /&gt;
&lt;br /&gt;&lt;A title="[http://simples.co.kr/RCEZone]로 이동합니다." href="http://simples.co.kr/RCEZone" target=_blank&gt;문제풀러가기&lt;/A&gt;&lt;div class="tt-plugin tt-share-entry-with-sns tt-sns-icon-alignment-right tt-sns-icon-size-small"&gt;
	&lt;div class="tt-sns-wrap" id="ttSnsWrap-"&gt;
		&lt;ul class="tt-sns-service-default"&gt;
			&lt;li class="tt-sns-service-mypeople"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('mypeople', '', '');"&gt;마이피플&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-twitter"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('twitter', '', '');"&gt;트위터&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-facebook"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('facebook', '', '');"&gt;페이스북&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-other"&gt;&lt;a href="javascript:;" onmouseover="ShareEntryWithSNS.showLayer(event, '');" onmouseout="ShareEntryWithSNS.hideLayer(event, '');"&gt;더보기&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
		&lt;ul class="tt-sns-service-more" id="ttSnsServiceMore-" onmouseout="ShareEntryWithSNS.hideLayer(event, '');"&gt;
			&lt;li class="tt-sns-service-me2day"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('me2day', '', '');"&gt;미투데이&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-yozm"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('yozm', '', '');"&gt;요즘&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/div&gt;
	&lt;div class="tt-sns-clear"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style="text-align:right; padding-top:10px;"&gt;
&lt;iframe src="http://www.facebook.com/plugins/like.php?href=zfanta.com/415&amp;amp;layout=button_count&amp;amp;show_faces=true&amp;amp;width=90&amp;amp;action=like&amp;amp;font=tahoma&amp;amp;colorscheme=light&amp;amp;height=65" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:65px;" allowTransparency="true"&gt;&lt;/iframe&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/zfanta/~4/FBTleNqZH4k" height="1" width="1"/&gt;</description>
			<category>뻘소리</category>
			<category>simples</category>
			<category>프로그래밍</category>
			<author>　환타</author>
			<guid isPermaLink="false">http://zfanta.com/415</guid>
			<comments>http://zfanta.com/entry/%EC%95%84-%EB%8B%A4%ED%92%80%EC%97%88%EB%8B%A4-%E3%85%8B%E3%85%8B%E3%85%8B%E3%85%8B#entry415comment</comments>
			<pubDate>Sun, 26 Oct 2008 22:11:26 +0900</pubDate>
		<feedburner:origLink>http://zfanta.com/415</feedburner:origLink></item>
		<item>
			<title>아나 안해</title>
			<link>http://feedproxy.google.com/~r/zfanta/~3/-MgzP_yzl7s/412</link>
			<description>&lt;div class="imageblock center" style="text-align: center; clear: both;"&gt;&lt;a href="http://cfs14.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczE0LnRpc3RvcnkuY29tOi9hdHRhY2gvMC8wLmpwZw%3D%3D" rel="lightbox" target="_blank"&gt;&lt;img src="http://cfs14.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczE0LnRpc3RvcnkuY29tOi9hdHRhY2gvMC8wLmpwZw%3D%3D" alt="사용자 삽입 이미지" height="345" width="401"/&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="imageblock center" style="text-align: center; clear: both;"&gt;&lt;a href="http://cfs11.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczExLnRpc3RvcnkuY29tOi9hdHRhY2gvMC8wLmpwZw%3D%3D" rel="lightbox" target="_blank"&gt;&lt;img src="http://cfs11.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczExLnRpc3RvcnkuY29tOi9hdHRhY2gvMC8wLmpwZw%3D%3D" alt="사용자 삽입 이미지" height="489" width="720"/&gt;&lt;/a&gt;&lt;/div&gt;안해&lt;br /&gt;&lt;img src="http://cfs12.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczEyLnRpc3RvcnkuY29tOi9hdHRhY2gvMC8wLmdpZg%3D%3D" width="233" height="205" /&gt;&lt;br /&gt;&lt;br /&gt;StolenByte가 뭔가요?&lt;br /&gt;&lt;br /&gt;&lt;A href="http://simples.co.kr/" target=_blank&gt;simples&lt;/A&gt;에서 하는건데 어렵네요.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Crackme 05는 뭔소린지 슈우바&lt;div class="tt-plugin tt-share-entry-with-sns tt-sns-icon-alignment-right tt-sns-icon-size-small"&gt;
	&lt;div class="tt-sns-wrap" id="ttSnsWrap-"&gt;
		&lt;ul class="tt-sns-service-default"&gt;
			&lt;li class="tt-sns-service-mypeople"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('mypeople', '', '');"&gt;마이피플&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-twitter"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('twitter', '', '');"&gt;트위터&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-facebook"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('facebook', '', '');"&gt;페이스북&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-other"&gt;&lt;a href="javascript:;" onmouseover="ShareEntryWithSNS.showLayer(event, '');" onmouseout="ShareEntryWithSNS.hideLayer(event, '');"&gt;더보기&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
		&lt;ul class="tt-sns-service-more" id="ttSnsServiceMore-" onmouseout="ShareEntryWithSNS.hideLayer(event, '');"&gt;
			&lt;li class="tt-sns-service-me2day"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('me2day', '', '');"&gt;미투데이&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-yozm"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('yozm', '', '');"&gt;요즘&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/div&gt;
	&lt;div class="tt-sns-clear"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style="text-align:right; padding-top:10px;"&gt;
&lt;iframe src="http://www.facebook.com/plugins/like.php?href=zfanta.com/412&amp;amp;layout=button_count&amp;amp;show_faces=true&amp;amp;width=90&amp;amp;action=like&amp;amp;font=tahoma&amp;amp;colorscheme=light&amp;amp;height=65" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:65px;" allowTransparency="true"&gt;&lt;/iframe&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/zfanta/~4/-MgzP_yzl7s" height="1" width="1"/&gt;</description>
			<category>뻘소리</category>
			<category>crack</category>
			<category>simples</category>
			<category>Unpacking</category>
			<author>　환타</author>
			<guid isPermaLink="false">http://zfanta.com/412</guid>
			<comments>http://zfanta.com/entry/%EC%95%84%EB%82%98-%EC%95%88%ED%95%B4#entry412comment</comments>
			<pubDate>Fri, 10 Oct 2008 18:11:19 +0900</pubDate>
		<feedburner:origLink>http://zfanta.com/412</feedburner:origLink></item>
		<item>
			<title>주민등록번호 노출에 대한 다음의 반응.</title>
			<link>http://feedproxy.google.com/~r/zfanta/~3/UIM7lhISRmc/405</link>
			<description>&lt;P&gt;참고 : &lt;A href="http://zfanta.com/entry/다음의-개인정보-보호-장난쳐" target=_blank&gt;다음의 개인정보 보호 장난쳐?&lt;/A&gt;&lt;br /&gt;&lt;br /&gt;1:1문의 메일을 저 글 링크와 함께 보냈다.&lt;br /&gt;&lt;br /&gt;&lt;div class="imageblock center" style="text-align: center; clear: both;"&gt;&lt;a href="http://cfs8.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczgudGlzdG9yeS5jb206L2F0dGFjaC8wLzI0MDAwMDAwMDAwMC5qcGc%3D" rel="lightbox" target="_blank"&gt;&lt;img src="http://cfs8.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczgudGlzdG9yeS5jb206L2F0dGFjaC8wLzI0MDAwMDAwMDAwMC5qcGc%3D" alt="사용자 삽입 이미지" height="378" width="611"/&gt;&lt;/a&gt;&lt;/div&gt;&lt;/P&gt;Daum에서는 해당되지 않는 자료이며.&lt;br /&gt;비밀번호는 암호화로 저장되기 때문에,&lt;br /&gt;반드시 일치해야 다음단계로 진행,&lt;br /&gt;성실히 답변해 드리겠습니다.&lt;br /&gt;&lt;br /&gt;아 이분 제 글 읽지 않고 상담원 안내서에 있는 거 그대로 보내주신 듯합니다. 저는 주민등록번호에 관해 문의드렸는데 비밀번호얘기만 하시네요. 만약 주민등록번호가 암호화되어있다면..........&lt;br /&gt;&lt;STRONG&gt;&lt;FONT size=4&gt;친절한 다음씨께서 폰 인증할 때 DB에 암호화되어 저장되어있는 주민등록번호를 다시 복호화하여 자동으로 입력시켜주는구요.&lt;br /&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;br /&gt;&lt;img src="http://cfs7.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczcudGlzdG9yeS5jb206L2F0dGFjaC8wLzI0MDAwMDAwMDAwMC5qcGc%3D" width="640" height="480" /&gt;&lt;br /&gt;&lt;STRONG&gt;&lt;FONT size=4&gt;&lt;br /&gt;그딴 거 개나 줘버려&lt;/FONT&gt;&lt;/STRONG&gt;&lt;br /&gt;&lt;br /&gt;복호화 못하게 암호화하고 저장해야하는 거 아닌가요?&lt;br /&gt;그리고 답변좀 성실히 해주세요 ㅜㅜ&lt;div class="tt-plugin tt-share-entry-with-sns tt-sns-icon-alignment-right tt-sns-icon-size-small"&gt;
	&lt;div class="tt-sns-wrap" id="ttSnsWrap-"&gt;
		&lt;ul class="tt-sns-service-default"&gt;
			&lt;li class="tt-sns-service-mypeople"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('mypeople', '', '');"&gt;마이피플&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-twitter"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('twitter', '', '');"&gt;트위터&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-facebook"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('facebook', '', '');"&gt;페이스북&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-other"&gt;&lt;a href="javascript:;" onmouseover="ShareEntryWithSNS.showLayer(event, '');" onmouseout="ShareEntryWithSNS.hideLayer(event, '');"&gt;더보기&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
		&lt;ul class="tt-sns-service-more" id="ttSnsServiceMore-" onmouseout="ShareEntryWithSNS.hideLayer(event, '');"&gt;
			&lt;li class="tt-sns-service-me2day"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('me2day', '', '');"&gt;미투데이&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-yozm"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('yozm', '', '');"&gt;요즘&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/div&gt;
	&lt;div class="tt-sns-clear"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="blogger-news-widget" style="width: 100%; text-align: center"&gt;
		  					&lt;embed src="http://api.v.daum.net/static/recombox1.swf" quality="high" flashvars="nid=1742477" allowscriptaccess="always" allowfullscreen="false" bgcolor="#ffffff" width="400" height="80" type="application/x-shockwave-flash" wmode="transparent"&gt;&lt;/embed&gt;
						&lt;/div&gt;&lt;div style="text-align:right; padding-top:10px;"&gt;
&lt;iframe src="http://www.facebook.com/plugins/like.php?href=zfanta.com/405&amp;amp;layout=button_count&amp;amp;show_faces=true&amp;amp;width=90&amp;amp;action=like&amp;amp;font=tahoma&amp;amp;colorscheme=light&amp;amp;height=65" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:65px;" allowTransparency="true"&gt;&lt;/iframe&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/zfanta/~4/UIM7lhISRmc" height="1" width="1"/&gt;</description>
			<category>정보 소식</category>
			<category>Daum</category>
			<category>개인정보 유출</category>
			<category>개인정보보호</category>
			<author>　환타</author>
			<guid isPermaLink="false">http://zfanta.com/405</guid>
			<comments>http://zfanta.com/entry/%EC%A3%BC%EB%AF%BC%EB%93%B1%EB%A1%9D%EB%B2%88%ED%98%B8-%EB%85%B8%EC%B6%9C%EC%97%90-%EB%8C%80%ED%95%9C-%EB%8B%A4%EC%9D%8C%EC%9D%98-%EB%B0%98%EC%9D%91#entry405comment</comments>
			<pubDate>Thu, 04 Sep 2008 18:13:13 +0900</pubDate>
		<feedburner:origLink>http://zfanta.com/405</feedburner:origLink></item>
		<item>
			<title>다음의 개인정보 보호 장난쳐?</title>
			<link>http://feedproxy.google.com/~r/zfanta/~3/w6kTFTVQSZU/404</link>
			<description>&lt;p&gt;오늘 다음에 비밀번호변경하러 들어갔...........&lt;br /&gt;&lt;div class="imageblock center" style="text-align: center; clear: both;"&gt;&lt;a href="http://cfs9.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczkudGlzdG9yeS5jb206L2F0dGFjaC8wLzIwMDAwMDAwMDAwMS5qcGc%3D" rel="lightbox" target="_blank"&gt;&lt;img src="http://cfs9.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczkudGlzdG9yeS5jb206L2F0dGFjaC8wLzIwMDAwMDAwMDAwMS5qcGc%3D" alt="사용자 삽입 이미지" height="201" width="407"/&gt;&lt;/a&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;는데 번호가 옛 번호라서 번호수정을 클릭하였습니다.&lt;br /&gt;&lt;br /&gt;&lt;div class="imageblock center" style="text-align: center; clear: both;"&gt;&lt;a href="http://cfs9.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczkudGlzdG9yeS5jb206L2F0dGFjaC8wLzIwMDAwMDAwMDAwMi5qcGc%3D" rel="lightbox" target="_blank"&gt;&lt;img src="http://cfs9.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczkudGlzdG9yeS5jb206L2F0dGFjaC8wLzIwMDAwMDAwMDAwMi5qcGc%3D" alt="사용자 삽입 이미지" height="254" width="425"/&gt;&lt;/a&gt;&lt;/div&gt;주민등록번호 부분을 보면 별동그라미별동그라미별별동그라미로 되어있습니다. 설마하는 마음에.......&lt;br /&gt;설마&lt;br /&gt;설마&lt;br /&gt;설마&lt;br /&gt;설마&lt;br /&gt;설마&lt;br /&gt;설마&lt;br /&gt;설마&lt;br /&gt;설마&lt;br /&gt;소스를 보니 주민등록번호가 나와버립니다.. 뒷자리까지. &lt;br /&gt;앞자리 검색하니 옆에 잘 붙어있더라구요.&lt;br /&gt;&lt;br /&gt;&lt;div class="imageblock center" style="text-align: center; clear: both;"&gt;&lt;a href="http://cfs8.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczgudGlzdG9yeS5jb206L2F0dGFjaC8wLzIwMDAwMDAwMDAwMS5qcGc%3D" rel="lightbox" target="_blank"&gt;&lt;img src="http://cfs8.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczgudGlzdG9yeS5jb206L2F0dGFjaC8wLzIwMDAwMDAwMDAwMS5qcGc%3D" alt="사용자 삽입 이미지" height="266" width="617"/&gt;&lt;/a&gt;&lt;/div&gt;&lt;/p&gt;&lt;br /&gt;주민번호를 저렇게 출력해주는 건 암호화가 안돼있다는 거 아닌가요???????????????????????????????????&lt;br /&gt;이렇게 짜 놓으면 옛날옛적 윈디소프트가 당한 게 생각나는데&lt;br /&gt;&lt;br /&gt;&lt;img src="http://cfs9.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczkudGlzdG9yeS5jb206L2F0dGFjaC8wLzIwMDAwMDAwMDAwMy5naWY%3D" width="300" height="200" /&gt;&lt;br /&gt;어쩔 거에요. 빨리 고쳐주시면................ 고마운데&lt;br /&gt;&lt;br /&gt;이 글을 볼지도 모르겠고.&lt;br /&gt;&lt;img src="http://cfs8.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczgudGlzdG9yeS5jb206L2F0dGFjaC8wLzIwMDAwMDAwMDAwMi5qcGc%3D" width="450" height="290" /&gt;&lt;br /&gt;이렇게 되기 전에 어서~~~~~~&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;제 주민번호 앞자리는 930320입니다. 제 생일이 3월 20일이라는 소리죠.&lt;br /&gt;뭐 그냥 그렇다구요.ㅎㅎ &lt;br /&gt;
&lt;p align="center"&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="tt-plugin tt-share-entry-with-sns tt-sns-icon-alignment-right tt-sns-icon-size-small"&gt;
	&lt;div class="tt-sns-wrap" id="ttSnsWrap-"&gt;
		&lt;ul class="tt-sns-service-default"&gt;
			&lt;li class="tt-sns-service-mypeople"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('mypeople', '', '');"&gt;마이피플&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-twitter"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('twitter', '', '');"&gt;트위터&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-facebook"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('facebook', '', '');"&gt;페이스북&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-other"&gt;&lt;a href="javascript:;" onmouseover="ShareEntryWithSNS.showLayer(event, '');" onmouseout="ShareEntryWithSNS.hideLayer(event, '');"&gt;더보기&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
		&lt;ul class="tt-sns-service-more" id="ttSnsServiceMore-" onmouseout="ShareEntryWithSNS.hideLayer(event, '');"&gt;
			&lt;li class="tt-sns-service-me2day"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('me2day', '', '');"&gt;미투데이&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-yozm"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('yozm', '', '');"&gt;요즘&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/div&gt;
	&lt;div class="tt-sns-clear"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="blogger-news-widget" style="width: 100%; text-align: center"&gt;
		  					&lt;embed src="http://api.v.daum.net/static/recombox1.swf" quality="high" flashvars="nid=1716456" allowscriptaccess="always" allowfullscreen="false" bgcolor="#ffffff" width="400" height="80" type="application/x-shockwave-flash" wmode="transparent"&gt;&lt;/embed&gt;
						&lt;/div&gt;&lt;div style="text-align:right; padding-top:10px;"&gt;
&lt;iframe src="http://www.facebook.com/plugins/like.php?href=zfanta.com/404&amp;amp;layout=button_count&amp;amp;show_faces=true&amp;amp;width=90&amp;amp;action=like&amp;amp;font=tahoma&amp;amp;colorscheme=light&amp;amp;height=65" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:65px;" allowTransparency="true"&gt;&lt;/iframe&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/zfanta/~4/w6kTFTVQSZU" height="1" width="1"/&gt;</description>
			<category>정보 소식</category>
			<category>Daum</category>
			<category>개인정보</category>
			<category>개인정보보호</category>
			<category>다음</category>
			<author>　환타</author>
			<guid isPermaLink="false">http://zfanta.com/404</guid>
			<comments>http://zfanta.com/entry/%EB%8B%A4%EC%9D%8C%EC%9D%98-%EA%B0%9C%EC%9D%B8%EC%A0%95%EB%B3%B4-%EB%B3%B4%ED%98%B8-%EC%9E%A5%EB%82%9C%EC%B3%90#entry404comment</comments>
			<pubDate>Fri, 29 Aug 2008 17:46:24 +0900</pubDate>
		<feedburner:origLink>http://zfanta.com/404</feedburner:origLink></item>
		<item>
			<title>C 소수판단 알고리즘</title>
			<link>http://feedproxy.google.com/~r/zfanta/~3/ZNd1so8QAYU/397</link>
			<description>&lt;p&gt;오랜만에 글 써보네요.&lt;br /&gt;
미안하지만 오늘 글은 모두 아는 소수 판단 알고리즘입니다. ㅈㅅㅈㅅㅈㅅ&lt;br /&gt;
&lt;br /&gt;
소수 : 1과 자신 외에는 나누어 떨어지는 정수가 없는 양의 정수.&lt;br /&gt;
&lt;br /&gt;
소수의 정의만 보면 2부터 n-1까지 나누어보아서 나누어지지 않으면 소수 나누어지면 소수가 아니라고 할 수 있습니다.&lt;br /&gt;
&lt;br /&gt;
&lt;/p&gt;
&lt;textarea class="c" name="code" style="margin-left: 0px; margin-right: 0px; width: 249px; margin-top: 1px; margin-bottom: 1px; height: 121px; "&gt;
int prime(int n)
{
	int i;
	for(i=2;i&lt;n;i++)
		if(n%i==0)
			return 0;
	return 1;
}&lt;/textarea&gt;&lt;br /&gt;
&lt;br /&gt;
이 함수는 느리다. ㅡ,.ㅡ&lt;br /&gt;
소수를 판별할 때 n의 제곱근까지만 나누어 보면 된다고 한다.&lt;br /&gt;
&lt;br /&gt;
16을 보면 16의 약수는 1*16, 2*8, 3*6, 4*4, 6*3, 8*2, 16*2 이렇게 앞 뒤가 서로 대칭된다.&lt;br /&gt;
그래서 제곱근을 구해주는 합수 sqrt(int)함수를 써보겠습니다.&lt;br /&gt;
&lt;br /&gt;
&lt;textarea class="c" name="code" style="margin-left: 0px; margin-right: 0px; width: 261px; margin-top: 1px; margin-bottom: 1px; height: 172px; "&gt;
int prime(int n)
{
	int i, sqrn;
	sqrn = (int)sqrt(n);
	for (i = 2; i &lt;= sqrn; i++)
		if (n % i == 0)
			return 0;

	return 1;
}&lt;/textarea&gt;&lt;br /&gt;
&lt;br /&gt;
 소수를 구하는 다른 알고리즘에는 에라토스의 체가 있습니다. &lt;br /&gt;
1부터 n까지의 소수를 구한다고 할 때 소수의 배수를 지워나가면서 남아있는 수를 구하는 알고리즘입니다.&lt;br /&gt;
&lt;textarea class="c" name="code" style="margin-left: 0px; margin-right: 0px; width: 542px; margin-top: 1px; margin-bottom: 1px; height: 356px; "&gt;
main()
{
	int *arr;
	int i,j;

	arr=(int *)calloc(101,sizeof(int));//0부터 100까지 배열생성;
	for(i=2;i&lt;=100;i++)
	{
		if(arr[i]==1)
			continue;
		j=i+i;
		while(j&lt;=100)
		{
			arr[j]=1;
			j+=i;//i의 배수로 증가
		}
	}

	for(i=2;i&lt;=100;i++)
		if(arr[i]==0)
			printf("%d ",i);
}&lt;/textarea&gt;&lt;br /&gt;
&lt;img src="http://cfs8.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczgudGlzdG9yeS5jb206L2F0dGFjaC8wLzExLmdpZg%3D%3D" width="161" height="241" /&gt;&lt;br /&gt;
다음부턴 열심히 쓸게요. 때리지 마요 제발&lt;div class="tt-plugin tt-share-entry-with-sns tt-sns-icon-alignment-right tt-sns-icon-size-small"&gt;
	&lt;div class="tt-sns-wrap" id="ttSnsWrap-"&gt;
		&lt;ul class="tt-sns-service-default"&gt;
			&lt;li class="tt-sns-service-mypeople"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('mypeople', '', '');"&gt;마이피플&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-twitter"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('twitter', '', '');"&gt;트위터&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-facebook"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('facebook', '', '');"&gt;페이스북&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-other"&gt;&lt;a href="javascript:;" onmouseover="ShareEntryWithSNS.showLayer(event, '');" onmouseout="ShareEntryWithSNS.hideLayer(event, '');"&gt;더보기&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
		&lt;ul class="tt-sns-service-more" id="ttSnsServiceMore-" onmouseout="ShareEntryWithSNS.hideLayer(event, '');"&gt;
			&lt;li class="tt-sns-service-me2day"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('me2day', '', '');"&gt;미투데이&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-yozm"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('yozm', '', '');"&gt;요즘&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/div&gt;
	&lt;div class="tt-sns-clear"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="blogger-news-widget" style="width: 100%; text-align: center"&gt;
		  					&lt;embed src="http://api.v.daum.net/static/recombox1.swf" quality="high" flashvars="nid=1577772" allowscriptaccess="always" allowfullscreen="false" bgcolor="#ffffff" width="400" height="80" type="application/x-shockwave-flash" wmode="transparent"&gt;&lt;/embed&gt;
						&lt;/div&gt;&lt;div style="text-align:right; padding-top:10px;"&gt;
&lt;iframe src="http://www.facebook.com/plugins/like.php?href=zfanta.com/397&amp;amp;layout=button_count&amp;amp;show_faces=true&amp;amp;width=90&amp;amp;action=like&amp;amp;font=tahoma&amp;amp;colorscheme=light&amp;amp;height=65" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:65px;" allowTransparency="true"&gt;&lt;/iframe&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/zfanta/~4/ZNd1so8QAYU" height="1" width="1"/&gt;</description>
			<category>algorithm</category>
			<category>c</category>
			<category>C 게임</category>
			<category>C언어</category>
			<category>소수</category>
			<category>알고리즘</category>
			<author>　환타</author>
			<guid isPermaLink="false">http://zfanta.com/397</guid>
			<comments>http://zfanta.com/entry/C-%EC%86%8C%EC%88%98%ED%8C%90%EB%8B%A8-%EC%95%8C%EA%B3%A0%EB%A6%AC%EC%A6%98#entry397comment</comments>
			<pubDate>Sat, 02 Aug 2008 14:53:11 +0900</pubDate>
		<feedburner:origLink>http://zfanta.com/397</feedburner:origLink></item>
		<item>
			<title>예쁜 ubuntu의 3D 데스크탑</title>
			<link>http://feedproxy.google.com/~r/zfanta/~3/a0GCVXCOk-Y/384</link>
			<description>&lt;DIV align=center&gt;
&lt;DIV style="TEXT-ALIGN: left" align=center&gt;우분투에 compiz와 kiba-dock, emerald를 적용한 제 컴을 녹화했습니다.&lt;/DIV&gt;&lt;/DIV&gt;
&lt;P&gt;식상하시겠지만 봐주세요 ㅋㅋ&lt;br /&gt;&lt;/P&gt;
&lt;P&gt;
&lt;DIV class=wlWriterSmartContent id=scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:84234e15-751b-4906-8d3d-87bc32fe7f77 style="PADDING-RIGHT: 0px; DISPLAY: inline; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px"&gt;
&lt;DIV id=5cd7a9a8-3a76-4bfa-909e-7cb404b09629 style="PADDING-RIGHT: 0px; DISPLAY: inline; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px"&gt;
&lt;/DIV&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/HqqvpXA1kUc&amp;amp;hl=ko"&gt;&lt;/param&gt;&lt;param name="wmode" value="transparent"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/HqqvpXA1kUc&amp;amp;hl=ko" type="application/x-shockwave-flash" wmode="transparent" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;아직 삽질이 덜되어서 보여드릴 게 별로 없네요. 컴퓨터 사양때문에 못보여드린 게 더 많아요. 이것보다 더 화려한 장면 많은데 말이죠 ㅋㅋㅋㅋ.&lt;/P&gt;
&lt;P&gt;이 동영상은 엄청나네요 ㄷㄷㄷㄷ&lt;br /&gt;&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/_ImW0-MgR8I&amp;amp;hl=ko"&gt;&lt;/param&gt;&lt;param name="wmode" value="transparent"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/_ImW0-MgR8I&amp;amp;hl=ko" type="application/x-shockwave-flash" wmode="transparent" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;/P&gt;
&lt;P&gt;
&lt;DIV class=wlWriterSmartContent id=scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:dd69ffcf-ea05-4bfc-8088-39f421029c4a style="PADDING-RIGHT: 0px; DISPLAY: inline; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px"&gt;
&lt;DIV id=04f7c451-b17b-41ab-bd7d-a515ba4359fa style="PADDING-RIGHT: 0px; DISPLAY: inline; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px"&gt;
&lt;/DIV&gt;&lt;/DIV&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;P&gt;&lt;A href="http://zfanta.com/owner/entry/edit/http://cfs9.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczkudGlzdG9yeS5jb206L2F0dGFjaC8wLzYuZ2lm"&gt;&lt;img src="http://cfs9.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczkudGlzdG9yeS5jb206L2F0dGFjaC8wLzcuZ2lm" height="181" /&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;우분투 멋져&lt;/P&gt;&lt;br /&gt;
&lt;P&gt;ps.아니 왜 힘들게 스킨에 Link메뉴 추가했는데 아무도 아는 척을 해주지 않는거야.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://zfanta.com/owner/entry/edit/http://cfs7.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczcudGlzdG9yeS5jb206L2F0dGFjaC8wLzcuanBn"&gt;&lt;img src="http://cfs8.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczgudGlzdG9yeS5jb206L2F0dGFjaC8wLzQuanBn" height="484" /&gt;&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;이런 내가 우스운건가 ㅋㅋㅋㅋ&lt;/P&gt;&lt;div class="tt-plugin tt-share-entry-with-sns tt-sns-icon-alignment-right tt-sns-icon-size-small"&gt;
	&lt;div class="tt-sns-wrap" id="ttSnsWrap-"&gt;
		&lt;ul class="tt-sns-service-default"&gt;
			&lt;li class="tt-sns-service-mypeople"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('mypeople', '', '');"&gt;마이피플&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-twitter"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('twitter', '', '');"&gt;트위터&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-facebook"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('facebook', '', '');"&gt;페이스북&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-other"&gt;&lt;a href="javascript:;" onmouseover="ShareEntryWithSNS.showLayer(event, '');" onmouseout="ShareEntryWithSNS.hideLayer(event, '');"&gt;더보기&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
		&lt;ul class="tt-sns-service-more" id="ttSnsServiceMore-" onmouseout="ShareEntryWithSNS.hideLayer(event, '');"&gt;
			&lt;li class="tt-sns-service-me2day"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('me2day', '', '');"&gt;미투데이&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-yozm"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('yozm', '', '');"&gt;요즘&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/div&gt;
	&lt;div class="tt-sns-clear"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style="text-align:right; padding-top:10px;"&gt;
&lt;iframe src="http://www.facebook.com/plugins/like.php?href=zfanta.com/384&amp;amp;layout=button_count&amp;amp;show_faces=true&amp;amp;width=90&amp;amp;action=like&amp;amp;font=tahoma&amp;amp;colorscheme=light&amp;amp;height=65" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:65px;" allowTransparency="true"&gt;&lt;/iframe&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/zfanta/~4/a0GCVXCOk-Y" height="1" width="1"/&gt;</description>
			<category>리눅스</category>
			<category>compiz</category>
			<category>ubuntu</category>
			<category>리눅스</category>
			<category>우분투</category>
			<author>　환타</author>
			<guid isPermaLink="false">http://zfanta.com/384</guid>
			<comments>http://zfanta.com/entry/%EC%98%88%EC%81%9C-ubuntu%EC%9D%98-3D-%EB%8D%B0%EC%8A%A4%ED%81%AC%ED%83%91#entry384comment</comments>
			<pubDate>Fri, 06 Jun 2008 15:36:59 +0900</pubDate>
		<feedburner:origLink>http://zfanta.com/384</feedburner:origLink></item>
		<item>
			<title>정렬 알고리즘 - 거품정렬(bubble sort)</title>
			<link>http://feedproxy.google.com/~r/zfanta/~3/oEzqKEpEMUU/377</link>
			<description>&lt;p&gt;버블정렬.&lt;br /&gt;
저음엔 이거만 있는 줄 알았는데.&lt;br /&gt;
지금은 GG상태.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/p&gt;
&lt;table bordercolordark="white" bordercolorlight="black" border="1" cellspacing="0" width="400"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td bgcolor="yellow" width="181"&gt;Z&lt;/td&gt;
&lt;td bgcolor="yellow" width="181"&gt;F&lt;/td&gt;
&lt;td width="181"&gt;A&lt;/td&gt;
&lt;td width="181"&gt;N&lt;/td&gt;
&lt;td width="181"&gt;T&lt;/td&gt;
&lt;td width="181"&gt;A&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="181"&gt;F&lt;/td&gt;
&lt;td bgcolor="yellow" width="181"&gt;Z&lt;/td&gt;
&lt;td bgcolor="yellow" width="181"&gt;A&lt;/td&gt;
&lt;td width="181"&gt;N&lt;/td&gt;
&lt;td width="181"&gt;T&lt;/td&gt;
&lt;td width="181"&gt;A&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="181"&gt;F&lt;/td&gt;
&lt;td width="181"&gt;A&lt;/td&gt;
&lt;td bgcolor="yellow" width="181"&gt;Z&lt;/td&gt;
&lt;td bgcolor="yellow" width="181"&gt;N&lt;/td&gt;
&lt;td width="181"&gt;T&lt;/td&gt;
&lt;td width="181"&gt;A&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="181"&gt;F&lt;/td&gt;
&lt;td width="181"&gt;A&lt;/td&gt;
&lt;td width="181"&gt;N&lt;/td&gt;
&lt;td bgcolor="yellow" width="181"&gt;Z&lt;/td&gt;
&lt;td bgcolor="yellow" width="181"&gt;T&lt;/td&gt;
&lt;td width="181"&gt;A&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="181"&gt;F&lt;/td&gt;
&lt;td width="181"&gt;A&lt;/td&gt;
&lt;td width="181"&gt;N&lt;/td&gt;
&lt;td width="181"&gt;T&lt;/td&gt;
&lt;td bgcolor="yellow" width="181"&gt;Z&lt;/td&gt;
&lt;td bgcolor="yellow" width="181"&gt;A&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="181"&gt;...&lt;/td&gt;
&lt;td width="181"&gt;...&lt;/td&gt;
&lt;td width="181"&gt;...&lt;/td&gt;
&lt;td width="181"&gt;...&lt;/td&gt;
&lt;td width="181"&gt;...&lt;/td&gt;
&lt;td width="181"&gt;...&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
이런 식으로 비고하면서 정렬된다.&lt;br /&gt;
몇 번 더해야되.&lt;br /&gt;

&lt;textarea name="code" class="c" style="margin-left: 0px; margin-right: 0px; width: 677px; margin-top: 1px; margin-bottom: 1px; height: 836px; "&gt;
#include &lt;stdlib.h&gt;  
#include &lt;stdio.h&gt;    
#include &lt;time.h&gt;    
#include &lt;conio.h&gt;  

int main()    
{    
	int a[100];    
	int start,end;    
	int max,min;    
	int count,count2;    
	int temp;  

	srand((unsigned)time(NULL));    

	printf("시작 : ");    
	scanf("%d",&amp;start);    
	printf("종료 : ");    
	scanf("%d",&amp;end);    

	min=end;    
	max=start;    

	printf("정렬 전\n");  
	for(count=0;count&lt;20;count++)    
	{    
		a[count]=rand() % (end - start + 1) + start;                
		printf("%3d",a[count]);    
	}  

	/*여기부터*/ 
	for (count = 20-1; count &gt; 0 ; count--)
	{ 
		for (count2 = 1; count2 &lt;= count ; count2++)
		{
			if (a[count2-1] &gt; a[count2])
			{
				temp = a[count2-1];
				a[count2-1] = a[count2];
				a[count2] = temp;       
			}
		}
	}
	/*여기까지 거품정렬입니다.*/ 

	printf("\n정렬 후\n");  
	for(count=0;count&lt;20;count++)    
	{    
		printf("%3d",a[count]);    
	}  

	getch();  
	return 0;    
}
&lt;/textarea&gt;&lt;br /&gt;
&lt;br /&gt;
참고 : &lt;a href="http://zfanta.com/entry/%EC%A0%95%EB%A0%AC-%EC%95%8C%EA%B3%A0%EB%A6%AC%EC%A6%98-%EC%84%A0%ED%83%9D%EC%A0%95%EB%A0%AC-Selection-Sort" target="_blank"&gt;선택정렬&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;img src="http://cfs7.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczcudGlzdG9yeS5jb206L2F0dGFjaC8wLzAuanBn" width="520" height="348" /&gt;&lt;br /&gt;
이거 좀 날로 먹는듯 ㅋㅋㅋ&lt;br /&gt;&lt;div class="tt-plugin tt-share-entry-with-sns tt-sns-icon-alignment-right tt-sns-icon-size-small"&gt;
	&lt;div class="tt-sns-wrap" id="ttSnsWrap-"&gt;
		&lt;ul class="tt-sns-service-default"&gt;
			&lt;li class="tt-sns-service-mypeople"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('mypeople', '', '');"&gt;마이피플&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-twitter"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('twitter', '', '');"&gt;트위터&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-facebook"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('facebook', '', '');"&gt;페이스북&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-other"&gt;&lt;a href="javascript:;" onmouseover="ShareEntryWithSNS.showLayer(event, '');" onmouseout="ShareEntryWithSNS.hideLayer(event, '');"&gt;더보기&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
		&lt;ul class="tt-sns-service-more" id="ttSnsServiceMore-" onmouseout="ShareEntryWithSNS.hideLayer(event, '');"&gt;
			&lt;li class="tt-sns-service-me2day"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('me2day', '', '');"&gt;미투데이&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-yozm"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('yozm', '', '');"&gt;요즘&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/div&gt;
	&lt;div class="tt-sns-clear"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style="text-align:right; padding-top:10px;"&gt;
&lt;iframe src="http://www.facebook.com/plugins/like.php?href=zfanta.com/377&amp;amp;layout=button_count&amp;amp;show_faces=true&amp;amp;width=90&amp;amp;action=like&amp;amp;font=tahoma&amp;amp;colorscheme=light&amp;amp;height=65" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:65px;" allowTransparency="true"&gt;&lt;/iframe&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/zfanta/~4/oEzqKEpEMUU" height="1" width="1"/&gt;</description>
			<category>algorithm</category>
			<category>c</category>
			<category>거품정렬</category>
			<category>버블정렬</category>
			<category>심심해</category>
			<category>알고리즘</category>
			<category>정렬</category>
			<category>프로그래밍</category>
			<author>　환타</author>
			<guid isPermaLink="false">http://zfanta.com/377</guid>
			<comments>http://zfanta.com/entry/%EC%A0%95%EB%A0%AC-%EC%95%8C%EA%B3%A0%EB%A6%AC%EC%A6%98-%EA%B1%B0%ED%92%88%EC%A0%95%EB%A0%ACbubble-sort#entry377comment</comments>
			<pubDate>Fri, 16 May 2008 17:16:27 +0900</pubDate>
		<feedburner:origLink>http://zfanta.com/377</feedburner:origLink></item>
		<item>
			<title>C언어 변환문자</title>
			<link>http://feedproxy.google.com/~r/zfanta/~3/CGTBEgAj8MM/369</link>
			<description>바로 예제부터 ㄱㄱ&lt;br /&gt;
&lt;br /&gt;
우리는 C언어를 처음 배울 때 이 소스부터 배우게됩니다.&lt;br /&gt;
&lt;textarea class="c" name="code" style="margin-top: 1px; margin-bottom: 1px; height: 108px; margin-left: 0px; margin-right: 0px; width: 301px; "&gt;
#include &lt;stdio.h&gt;

void main()
{
	printf("Hello world");
}
&lt;/textarea&gt;&lt;br /&gt;
위 소스는 누구나 쉽게 이해알 수 있죠. 문제는 아래소스&lt;br /&gt;
&lt;textarea class="c" name="code" style="margin-top: 1px; margin-bottom: 1px; height: 136px; margin-left: 0px; margin-right: 0px; width: 304px; "&gt;
#include &lt;stdio.h&gt;

void main()
{
	int a=5;
	printf("%d",a);

}
&lt;/textarea&gt;&lt;br /&gt;
중간에 나오는 %d라는 놈 덕에 꽤 당황하죠.&lt;br /&gt;
&lt;br /&gt;
%d는 변환문자라고 합니다. 순서에 대응하는 변수를 만지작(?) 합니다.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;1.변환문자의 종류에는 &lt;/strong&gt;&lt;br /&gt;
&lt;table bordercolordark="white" bordercolorlight="black" border="1" cellspacing="0" width="600"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td width="145"&gt;
&lt;p&gt;%d,%i &lt;/p&gt;
&lt;/td&gt;
&lt;td width="445"&gt;
&lt;p&gt;부호 있는 10진 정수형 출력.&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="145"&gt;
&lt;p&gt;%u&lt;/p&gt;
&lt;/td&gt;
&lt;td width="445"&gt;
&lt;p&gt;부호 없는 10진 정수형 출력.&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="145"&gt;
&lt;p&gt;%o &lt;/p&gt;
&lt;/td&gt;
&lt;td width="445"&gt;
&lt;p&gt;부호 없는 8진 정수형 출력.&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td height="20" width="145"&gt;
&lt;p&gt;%x, %X &lt;/p&gt;
&lt;/td&gt;
&lt;td height="20" width="445"&gt;
&lt;p&gt;부호 없는 16진 정수형 출력, x는 소문자, X는 대문자로 출력된다.&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td height="20" width="145"&gt;
&lt;p&gt;%c &lt;/p&gt;
&lt;/td&gt;
&lt;td height="20" width="445"&gt;
&lt;p&gt;한 개의 문자 출력. 문자의 아스키 코드가 인수로 사용된다.&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td height="39" width="145"&gt;
&lt;p&gt;%f  &lt;/p&gt;
&lt;/td&gt;
&lt;td height="39" width="445"&gt;
&lt;p&gt;소숫점 표기. float형이나 double형을 출력한다.&lt;br /&gt;
정밀도가 나오지 않으면 소숫점 6자리까지 출력된다.&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="145"&gt;
&lt;p&gt;%s  &lt;/p&gt;
&lt;/td&gt;
&lt;td width="445"&gt;
&lt;p&gt;마지막 NULL을 제외한 문자열을 출력&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="145"&gt;
&lt;p&gt;%%&lt;/p&gt;
&lt;/td&gt;
&lt;td width="445"&gt;
&lt;p&gt;문자 '%'출력&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
제가 써본거라곤 d,c,f,s밖에 없네요.ㅋㅋ&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;2.printf에서&lt;br /&gt;
&lt;/strong&gt;printf에서 변환문자로 재밌게 놀 수 있습니다.&lt;br /&gt;
&lt;textarea class="c" name="code" style="margin-top: 1px; margin-bottom: 1px; height: 126px; margin-left: 0px; margin-right: 0px; width: 328px; "&gt;
#include &lt;stdio.h&gt;

void main()
{
	int a=5;
	printf("%4d",a);
}
&lt;/textarea&gt;&lt;br /&gt;
달라진 건 printf의 %d사이에 숫자 4가 있다는 거.&lt;span style="font-weight: bold;"&gt; ("필드 폭 지정자"라고 합니다.)&lt;/span&gt;&lt;br /&gt;
이건 폭을 지정합니다. (기본은 오른쪽정렬)&lt;br /&gt;
가운데의 숫자 바꿔가면서 하면 금방 아실거에요.&lt;br /&gt;
왼쪽으로 정렬하고 싶다면.&lt;br /&gt;
&lt;textarea name="code" class="c" style="margin-left: 0px; margin-right: 0px; width: 285px; margin-top: 1px; margin-bottom: 1px; height: 121px; "&gt;
#include &lt;stdio.h&gt;

void main()
{
    int a=5;
    printf("%-4d",a);
}
&lt;/textarea&gt;&lt;br /&gt;
달라진 건 %4d가 %-4d로 바뀐 거 밖에 없어요. &lt;span style="font-weight: bold;"&gt;(이 "-"는 "플래그"라고 합니다.)&lt;br /&gt;
&lt;/span&gt;플래그의 종류에는&lt;br /&gt;
&lt;table bordercolordark="white" bordercolorlight="black" border="1" cellspacing="0" width="600"&gt;
    &lt;tbody&gt;&lt;tr&gt;
        &lt;td width="72"&gt;-&lt;/td&gt;
        &lt;td width="518"&gt;
            &lt;p&gt;출력되는 내용을  왼쪽으로 정렬&lt;br /&gt;
적지 않으면 기본으로 오른쪽 정렬&lt;/p&gt;
&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td width="72"&gt;+&lt;/td&gt;
        &lt;td width="518"&gt;            &lt;p&gt;수를 출력할 때 항상 +나 -를 앞에 출력&lt;/p&gt;
&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td width="72"&gt;  (공백)&lt;/td&gt;
        &lt;td width="518"&gt;            &lt;p&gt;수를 출력할 때 앞을 빈칸으로&lt;/p&gt;
&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td width="72"&gt;#&lt;/td&gt;
        &lt;td width="518"&gt;%o, %x, %X에서만 쓰임, 8진수는 0, 16진수는 0x를 앞에 출력&lt;/td&gt;
    &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
참 쉽죠?&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-weight: bold;"&gt;2. scanf에서&lt;br /&gt;
&lt;/span&gt;scanf에서도 재밌게 놀 수 있어요.&lt;br /&gt;
작년에 이걸 알았다면 대회에서 GG는 없었을 텐데요. ㅜㅜ&lt;br /&gt;
&lt;br /&gt;
2개 이상의 수 입력받기.&lt;br /&gt;
&lt;textarea name="code" class="c" style="margin-left: 0px; margin-right: 0px; width: 324px; margin-top: 1px; margin-bottom: 1px; height: 186px; "&gt;
#include &lt;stdio.h&gt;

main()
{
	int a,b;
	printf("숫자 2개 : ");
	scanf("%d%d",&amp;a,&amp;b);

	printf("\n%d하고 %d\n",a,b);
}
&lt;/textarea&gt;&lt;br /&gt;
대부분 이헐게 합니다. 공백을 기준으로 숫자를 입력받죠. &lt;br /&gt;
,(쉼표)로 숫자를 구분하고 싶을 때는 간단하게 &lt;br /&gt;
&lt;span style="font-weight: bold;"&gt;scanf("%d%d",&amp;amp;a,&amp;amp;b);&lt;/span&gt;를 &lt;span style="font-weight: bold;"&gt;scanf("%d,%d",&amp;amp;a,&amp;amp;b);&lt;/span&gt;로 바꿔주면 끝.&lt;br /&gt;
&lt;br /&gt;
%d와 %d사이에 ,를 넣었습니다.&lt;br /&gt;
scanf는 여기서 끝내겠습니다. &lt;br /&gt;
&lt;br /&gt;
&lt;p id="more369_0" class="moreless_fold"&gt;&lt;span style="cursor: pointer;" onclick="toggleMoreLess(this, '369_0','이건 헛소리....','less..'); return false;"&gt;이건 헛소리....&lt;/span&gt;&lt;/p&gt;&lt;div id="content369_0" class="moreless_content" style="display: none;"&gt;저처럼 저 방법 모르고 gets함수 써서 문자열 입력받고 -48하던 분은 없겠죠?&lt;br /&gt;
호랑이 담배피던 시절 나는......&lt;br /&gt;
&lt;br /&gt;
3초안에 웃겨드리는 소스 ㅋㅋ(모르던 시절에 쓰던...)&lt;br /&gt;
&lt;textarea name="code" class="c" style="margin-left: 0px; margin-right: 0px; width: 485px; margin-top: 1px; margin-bottom: 1px; height: 297px; "&gt;#include &lt;stdio.h&gt;

main()
{
	char a[4];
	int b,c;
	int count;
	printf("숫자 2개 : ");
	gets(&amp;a);

	for(count=0;a[count]!='\0';count++)
	{
		if(a[count]&gt;=48 &amp;&amp; a[count]&lt;=57)
			a[count]-=48;
	}

	printf("\n%d 하고 %d",a[0],a[2]);
}&lt;/textarea&gt;&lt;br /&gt;
즐거우셨나요?&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;&lt;div class="tt-plugin tt-share-entry-with-sns tt-sns-icon-alignment-right tt-sns-icon-size-small"&gt;
	&lt;div class="tt-sns-wrap" id="ttSnsWrap-"&gt;
		&lt;ul class="tt-sns-service-default"&gt;
			&lt;li class="tt-sns-service-mypeople"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('mypeople', '', '');"&gt;마이피플&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-twitter"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('twitter', '', '');"&gt;트위터&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-facebook"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('facebook', '', '');"&gt;페이스북&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-other"&gt;&lt;a href="javascript:;" onmouseover="ShareEntryWithSNS.showLayer(event, '');" onmouseout="ShareEntryWithSNS.hideLayer(event, '');"&gt;더보기&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
		&lt;ul class="tt-sns-service-more" id="ttSnsServiceMore-" onmouseout="ShareEntryWithSNS.hideLayer(event, '');"&gt;
			&lt;li class="tt-sns-service-me2day"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('me2day', '', '');"&gt;미투데이&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-yozm"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('yozm', '', '');"&gt;요즘&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/div&gt;
	&lt;div class="tt-sns-clear"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="blogger-news-widget" style="width: 100%; text-align: center"&gt;
		  					&lt;embed src="http://api.v.daum.net/static/recombox1.swf" quality="high" flashvars="nid=957879" allowscriptaccess="always" allowfullscreen="false" bgcolor="#ffffff" width="400" height="80" type="application/x-shockwave-flash" wmode="transparent"&gt;&lt;/embed&gt;
						&lt;/div&gt;&lt;div style="text-align:right; padding-top:10px;"&gt;
&lt;iframe src="http://www.facebook.com/plugins/like.php?href=zfanta.com/369&amp;amp;layout=button_count&amp;amp;show_faces=true&amp;amp;width=90&amp;amp;action=like&amp;amp;font=tahoma&amp;amp;colorscheme=light&amp;amp;height=65" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:65px;" allowTransparency="true"&gt;&lt;/iframe&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/zfanta/~4/CGTBEgAj8MM" height="1" width="1"/&gt;</description>
			<category>C/C++</category>
			<category>c</category>
			<category>C언어</category>
			<category>변환문자</category>
			<category>프로그래밍</category>
			<author>　환타</author>
			<guid isPermaLink="false">http://zfanta.com/369</guid>
			<comments>http://zfanta.com/entry/C%EC%96%B8%EC%96%B4-%EB%B3%80%ED%99%98%EB%AC%B8%EC%9E%90-%EC%82%AC%EC%9A%A9%EB%B2%95#entry369comment</comments>
			<pubDate>Wed, 26 Mar 2008 18:20:57 +0900</pubDate>
		<feedburner:origLink>http://zfanta.com/369</feedburner:origLink></item>
		<item>
			<title>C언어로 게임만들기 [미로편] # 2</title>
			<link>http://feedproxy.google.com/~r/zfanta/~3/Dt7JJai_wSY/368</link>
			<description>&lt;p&gt;오늘은 2번째.&lt;br /&gt;
내일 3번째 글 올리면 끝날 것 같다.&lt;br /&gt;
아 진짜 블로그에 쓸 글이 없어&lt;br /&gt;
&lt;br /&gt;
새로 추가된 move함수입니다. 방향키를 입력받아서 돌을 움직입니다.&lt;br /&gt;
&lt;/p&gt;
&lt;textarea class="c" name="code" style="margin-left: 0px; margin-right: 0px; width: 516px; margin-top: 1px; margin-bottom: 1px; height: 955px; "&gt;
void move()
{
	int input;
	input=getch();

	switch(input)
	{
	case RIGHT :
		if(x&lt;40)
		{              
			if(map1[y][(x/2)+1] == 0)
			{
				gotoxy(x,y);
				printf(" ");
				x+=2;
				gotoxy(x,y);
				printf("●");
			}
		}
		break;

	case LEFT :
		if(x&gt;1)
		{              
			if(map1[y][(x/2)-1] == 0)
			{
				gotoxy(x,y);
				printf(" ");
				x-=2;
				gotoxy(x,y);
				printf("●");
			}
		}
		break;
	case UP :
		if(y&gt;1)
		{              
			if(map1[y-1][x/2] == 0)
			{
				gotoxy(x,y);
				printf(" ");
				y-=1;
				gotoxy(x,y);
				printf("●");
			}
		}
		break;

	case DOWN :
		if(y&lt;20)
		{              
			if(map1[y+1][x/2] == 0)
			{
				gotoxy(x,y);
				printf(" ");
				y+=1;
				gotoxy(x,y);
				printf("●");
			}
		}
		break;
	}
}&lt;/textarea&gt;&lt;br /&gt;
가는 곳에 벽이 없다면 지금 위치에 있는 걸 지우고 새로운 돌을 그립니다.&lt;br /&gt;
&lt;br /&gt;
move함수 호출은 이렇게 무한루프 ㅇ_ㅇ&lt;br /&gt;
&lt;textarea class="c" name="code" style="margin-top: 1px; margin-bottom: 1px; height: 64px; margin-left: 0px; margin-right: 0px; width: 180px; "&gt;while(1)
{
	move();
}&lt;/textarea&gt;&lt;br /&gt;
&lt;br /&gt;
최종 소스&lt;br /&gt;
&lt;textarea class="c" name="code" style="margin-left: 0px; margin-right: 0px; width: 647px; margin-top: 1px; margin-bottom: 1px; height: 1995px; "&gt;#include &lt;stdio.h&gt;
#include &lt;windows.h&gt;
#include &lt;conio.h&gt;

#define UP 72
#define DOWN 80
#define LEFT 75
#define RIGHT 77

int x,y;

int map1[20][20]=
{
    { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
    { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 },
    { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1 },
    { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 },
    { 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
    { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 },
    { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1 },
    { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 },
    { 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
    { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 },
    { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1 },
    { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 },
    { 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
    { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 },
    { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1 },
    { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 },
    { 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
    { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
    { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } 
};

void gotoxy(int x, int y) 
{
    COORD XY = {x, y};
    SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), XY);
}

void move()
{
    int input;
    input=getch();

    switch(input)
    {
    case RIGHT :
        if(x&lt;40)
        {
            if(map1[y][(x/2)+1] == 0)
            {
                gotoxy(x,y);
                printf(" ");
                x+=2;
                gotoxy(x,y);
                printf("●");
            }
        }
        break;

    case LEFT :
        if(x&gt;1)
        {
            if(map1[y][(x/2)-1] == 0)
            {
                gotoxy(x,y);
                printf(" ");
                x-=2;
                gotoxy(x,y);
                printf("●");
            }
        }
        break;
    
	case UP :
        if(y&gt;1)
        {
            if(map1[y-1][x/2] == 0)
            {
                gotoxy(x,y);
                printf(" ");
                y-=1;
                gotoxy(x,y);
                printf("●");
            }
        }
        break;

    case DOWN :
        if(y&lt;20)
        {
            if(map1[y+1][x/2] == 0)
            {
                gotoxy(x,y);
                printf(" ");
                y+=1;
                gotoxy(x,y);
                printf("●");
            }
        }
        break;
    }
}


void main()
{
    int count,count2;
    for(count=0;count&lt;20;count++)
    {
        for(count2=0;count2&lt;20;count2++)
        {
            if(map1[count][count2]==1)
                printf("○");
            else
                printf("  ");
        }
        printf("\n");
    }

    x=0;
    y=1;

    gotoxy(x,y);
    printf("●");
    while(1)
    {
        move();
    }
}&lt;/textarea&gt;&lt;br /&gt;
&lt;br /&gt;
추가된 게 move함수밖에 없네요. (목숨만은 살려주세요)&lt;br /&gt;
이해안가는 부분은 리플 ㄱㄱ&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Ps. 그거보다 내일 월요일 ㅜㅜㅜㅜ&lt;br /&gt;
&lt;/strong&gt;&lt;img src="http://cfs4.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczQudGlzdG9yeS5jb206L2F0dGFjaC8wLzIwMDAwMDAwMDAwMC5qcGc%3D" width="383" height="217" /&gt;&lt;br /&gt;
&lt;strong&gt;학교가자&lt;/strong&gt;&lt;div class="tt-plugin tt-share-entry-with-sns tt-sns-icon-alignment-right tt-sns-icon-size-small"&gt;
	&lt;div class="tt-sns-wrap" id="ttSnsWrap-"&gt;
		&lt;ul class="tt-sns-service-default"&gt;
			&lt;li class="tt-sns-service-mypeople"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('mypeople', '', '');"&gt;마이피플&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-twitter"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('twitter', '', '');"&gt;트위터&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-facebook"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('facebook', '', '');"&gt;페이스북&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-other"&gt;&lt;a href="javascript:;" onmouseover="ShareEntryWithSNS.showLayer(event, '');" onmouseout="ShareEntryWithSNS.hideLayer(event, '');"&gt;더보기&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
		&lt;ul class="tt-sns-service-more" id="ttSnsServiceMore-" onmouseout="ShareEntryWithSNS.hideLayer(event, '');"&gt;
			&lt;li class="tt-sns-service-me2day"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('me2day', '', '');"&gt;미투데이&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-yozm"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('yozm', '', '');"&gt;요즘&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/div&gt;
	&lt;div class="tt-sns-clear"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="blogger-news-widget" style="width: 100%; text-align: center"&gt;
		  					&lt;embed src="http://api.v.daum.net/static/recombox1.swf" quality="high" flashvars="nid=939446" allowscriptaccess="always" allowfullscreen="false" bgcolor="#ffffff" width="400" height="80" type="application/x-shockwave-flash" wmode="transparent"&gt;&lt;/embed&gt;
						&lt;/div&gt;&lt;div style="text-align:right; padding-top:10px;"&gt;
&lt;iframe src="http://www.facebook.com/plugins/like.php?href=zfanta.com/368&amp;amp;layout=button_count&amp;amp;show_faces=true&amp;amp;width=90&amp;amp;action=like&amp;amp;font=tahoma&amp;amp;colorscheme=light&amp;amp;height=65" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:65px;" allowTransparency="true"&gt;&lt;/iframe&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/zfanta/~4/Dt7JJai_wSY" height="1" width="1"/&gt;</description>
			<category>C/C++</category>
			<category>c</category>
			<category>C언어</category>
			<category>게임</category>
			<category>미로</category>
			<category>월요일</category>
			<category>프로그래밍</category>
			<author>　환타</author>
			<guid isPermaLink="false">http://zfanta.com/368</guid>
			<comments>http://zfanta.com/entry/C%EC%96%B8%EC%96%B4%EB%A1%9C-%EA%B2%8C%EC%9E%84%EB%A7%8C%EB%93%A4%EA%B8%B0%EB%AF%B8%EB%A1%9C%ED%8E%B8-2#entry368comment</comments>
			<pubDate>Sun, 23 Mar 2008 16:02:17 +0900</pubDate>
		<feedburner:origLink>http://zfanta.com/368</feedburner:origLink></item>
		<item>
			<title>C언어로 게임만들기 [미로편]</title>
			<link>http://feedproxy.google.com/~r/zfanta/~3/kf9x70mrOHc/367</link>
			<description>저번에 지저분한 소스로 간신히 오목 만들고 나서 이번엔 미로찾기입니다..&lt;br /&gt;
이번 게임이 더쉬운데 귀찮아요. ㅡㅡ 개학하니까 죽을 것 같아요.&lt;br /&gt;
살려주세요.&lt;br /&gt;
&lt;br /&gt;
예전 글은 &lt;a href="http://zfanta.com/333"&gt;C언어로 오목만들기 5 마지막.&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
예전처럼 #define로 방향키 설정해주고&lt;br /&gt;
&lt;textarea class="c" name="code" style="margin-left: 0px; margin-right: 0px; width: 232px; margin-top: 1px; margin-bottom: 1px; height: 65px; "&gt;
#define UP 72
#define DOWN 80
#define LEFT 75
#define RIGHT 77&lt;/textarea&gt;&lt;br /&gt;
&lt;br /&gt;
커서를 이동해주는 함수 gotoxy도 정의해주고&lt;br /&gt;
&lt;textarea class="c" name="code" style="margin-top: 1px; margin-bottom: 1px; height: 86px; margin-left: 0px; margin-right: 0px; width: 508px; "&gt;void gotoxy(int x, int y) 
{
    COORD XY = {x, y};
    SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), XY);
}&lt;/textarea&gt;&lt;br /&gt;
이 함수를 쓰시려면 #include &amp;lt;windows.h&gt; 를 꼭.&lt;br /&gt;
&lt;br /&gt;
그리고 미로도 만들어줍니다. 1은 벽,0은 빈 공간입니다.&lt;br /&gt;
&lt;textarea class="c" name="code" style="margin-left: 0px; margin-right: 0px; width: 498px; margin-top: 1px; margin-bottom: 1px; height: 359px; "&gt;int map1[20][20]=
{
    { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
    { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 },
    { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1 },
    { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 },
    { 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
    { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 },
    { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1 },
    { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 },
    { 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
    { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 },
    { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1 },
    { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 },
    { 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
    { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 },
    { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1 },
    { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 },
    { 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
    { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
    { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } 
};&lt;/textarea&gt;&lt;br /&gt;
가로 20, 세로 20의 미로입니다.&lt;br /&gt;
참.................................&lt;br /&gt;
&lt;br /&gt;
이건 화면에 미로를 그려주는 main함수&lt;br /&gt;
&lt;textarea class="c" name="code" style="margin-left: 0px; margin-right: 0px; width: 433px; margin-top: 1px; margin-bottom: 1px; height: 259px; "&gt;main()
{
	int count,count2;
	for(count=0;count&lt;20;count++)
	{
		for(count2=0;count2&lt;20;count2++)
		{
			if(map1[count][count2]==1)
				printf("○");
			else
				printf("  ");
		}
		printf("\n");
	}
	system("PAUSE");
}&lt;/textarea&gt;&lt;br /&gt;
&lt;br /&gt;
이만 미로 그리는 부분에서 끝내렵니다.&lt;br /&gt;
&lt;img src="http://cfs5.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczUudGlzdG9yeS5jb206L2F0dGFjaC8wLzE4MDAwMDAwMDAwMy5qcGc%3D" width="669" height="436" /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
개학이 사람잡네요.&lt;br /&gt;
&lt;img src="http://cfs6.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczYudGlzdG9yeS5jb206L2F0dGFjaC8wLzIwMDAwMDAwMDAwMC5qcGc%3D" width="550" height="369" /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;div class="tt-plugin tt-share-entry-with-sns tt-sns-icon-alignment-right tt-sns-icon-size-small"&gt;
	&lt;div class="tt-sns-wrap" id="ttSnsWrap-"&gt;
		&lt;ul class="tt-sns-service-default"&gt;
			&lt;li class="tt-sns-service-mypeople"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('mypeople', '', '');"&gt;마이피플&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-twitter"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('twitter', '', '');"&gt;트위터&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-facebook"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('facebook', '', '');"&gt;페이스북&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-other"&gt;&lt;a href="javascript:;" onmouseover="ShareEntryWithSNS.showLayer(event, '');" onmouseout="ShareEntryWithSNS.hideLayer(event, '');"&gt;더보기&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
		&lt;ul class="tt-sns-service-more" id="ttSnsServiceMore-" onmouseout="ShareEntryWithSNS.hideLayer(event, '');"&gt;
			&lt;li class="tt-sns-service-me2day"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('me2day', '', '');"&gt;미투데이&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-yozm"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('yozm', '', '');"&gt;요즘&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/div&gt;
	&lt;div class="tt-sns-clear"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="blogger-news-widget" style="width: 100%; text-align: center"&gt;
		  					&lt;embed src="http://api.v.daum.net/static/recombox1.swf" quality="high" flashvars="nid=933461" allowscriptaccess="always" allowfullscreen="false" bgcolor="#ffffff" width="400" height="80" type="application/x-shockwave-flash" wmode="transparent"&gt;&lt;/embed&gt;
						&lt;/div&gt;&lt;div style="text-align:right; padding-top:10px;"&gt;
&lt;iframe src="http://www.facebook.com/plugins/like.php?href=zfanta.com/367&amp;amp;layout=button_count&amp;amp;show_faces=true&amp;amp;width=90&amp;amp;action=like&amp;amp;font=tahoma&amp;amp;colorscheme=light&amp;amp;height=65" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:65px;" allowTransparency="true"&gt;&lt;/iframe&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/zfanta/~4/kf9x70mrOHc" height="1" width="1"/&gt;</description>
			<category>C/C++</category>
			<category>c</category>
			<category>C언어</category>
			<category>게임</category>
			<category>프로그래밍</category>
			<author>　환타</author>
			<guid isPermaLink="false">http://zfanta.com/367</guid>
			<comments>http://zfanta.com/entry/C%EC%96%B8%EC%96%B4%EB%A1%9C-%EA%B2%8C%EC%9E%84%EB%A7%8C%EB%93%A4%EA%B8%B0-%EC%98%A4%EB%AA%A9%ED%8E%B8#entry367comment</comments>
			<pubDate>Sat, 22 Mar 2008 00:27:35 +0900</pubDate>
		<feedburner:origLink>http://zfanta.com/367</feedburner:origLink></item>
		<item>
			<title>정렬 알고리즘 - 선택정렬 (Selection Sort)</title>
			<link>http://feedproxy.google.com/~r/zfanta/~3/IRHzEHQLp70/359</link>
			<description>오늘은 정렬중 쉽고 쉬운 선택정렬입니다.&lt;br /&gt;
&lt;p&gt;아래 표는 정렬 과정.&lt;br /&gt;
&lt;br /&gt;
&lt;/p&gt;
&lt;table bordercolordark="white" bordercolorlight="black" border="1" cellspacing="0" width="446"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td bgcolor="white" height="35" width="70"&gt;&lt;br /&gt;
&lt;/td&gt;
&lt;td bgcolor="white" height="35" width="70"&gt;
&lt;p align="center"&gt;a[0]&lt;/p&gt;
&lt;/td&gt;
&lt;td height="70" width="70"&gt;
&lt;p align="center"&gt;a[1]&lt;/p&gt;
&lt;/td&gt;
&lt;td height="70" width="70"&gt;
&lt;p align="center"&gt;a[2]&lt;/p&gt;
&lt;/td&gt;
&lt;td height="70" width="70"&gt;
&lt;p align="center"&gt;a[3]&lt;/p&gt;
&lt;/td&gt;
&lt;td height="70" width="70"&gt;
&lt;p align="center"&gt;a[4]&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td bgcolor="white" height="35" width="70"&gt;
&lt;p align="center"&gt;1.&lt;/p&gt;
&lt;/td&gt;
&lt;td bgcolor="white" height="35" width="70"&gt;
&lt;p align="center"&gt;&lt;b&gt;9&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td height="70" width="70"&gt;
&lt;p align="center"&gt;&lt;b&gt;12&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td height="70" width="70"&gt;
&lt;p align="center"&gt;&lt;b&gt;61&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td height="70" width="70"&gt;
&lt;p align="center"&gt;&lt;b&gt;5&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td height="70" width="70"&gt;
&lt;p align="center"&gt;&lt;b&gt;1&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td bgcolor="white" height="70" width="70"&gt;
&lt;p align="center"&gt;2.&lt;/p&gt;
&lt;/td&gt;
&lt;td bgcolor="#cccccc" height="70" width="70"&gt;
&lt;p align="center"&gt;&lt;b&gt;1&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td bgcolor="white" height="70" width="70"&gt;
&lt;p align="center"&gt;&lt;b&gt;12&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td height="70" width="70"&gt;
&lt;p align="center"&gt;&lt;b&gt;61&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td height="70" width="70"&gt;
&lt;p align="center"&gt;&lt;b&gt;5&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td height="70" width="70"&gt;
&lt;p align="center"&gt;&lt;b&gt;9&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td bgcolor="white" height="70" width="70"&gt;
&lt;p align="center"&gt;3.&lt;/p&gt;
&lt;/td&gt;
&lt;td bgcolor="#cccccc" height="70" width="70"&gt;
&lt;p align="center"&gt;&lt;b&gt;1&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td bgcolor="#cccccc" height="70" width="70"&gt;
&lt;p align="center"&gt;&lt;b&gt;5&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td bgcolor="white" height="70" width="70"&gt;
&lt;p align="center"&gt;&lt;b&gt;61&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td height="70" width="70"&gt;
&lt;p align="center"&gt;&lt;b&gt;12&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td height="70" width="70"&gt;
&lt;p align="center"&gt;&lt;b&gt;9&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td bgcolor="white" height="70" width="70"&gt;
&lt;p align="center"&gt;4.&lt;/p&gt;
&lt;/td&gt;
&lt;td bgcolor="#cccccc" height="70" width="70"&gt;
&lt;p align="center"&gt;&lt;b&gt;1&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td bgcolor="#cccccc" height="70" width="70"&gt;
&lt;p align="center"&gt;&lt;b&gt;5&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td bgcolor="#cccccc" height="70" width="70"&gt;
&lt;p align="center"&gt;&lt;b&gt;9&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td bgcolor="white" height="70" width="70"&gt;
&lt;p align="center"&gt;&lt;b&gt;12&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td height="70" width="70"&gt;
&lt;p align="center"&gt;&lt;b&gt;61&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td bgcolor="white" height="70" width="70"&gt;
&lt;p align="center"&gt;5.&lt;/p&gt;
&lt;/td&gt;
&lt;td bgcolor="#cccccc" height="70" width="70"&gt;
&lt;p align="center"&gt;&lt;b&gt;1&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td bgcolor="#cccccc" height="70" width="70"&gt;
&lt;p align="center"&gt;&lt;b&gt;5&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td bgcolor="#cccccc" height="70" width="70"&gt;
&lt;p align="center"&gt;&lt;b&gt;9&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td bgcolor="#cccccc" height="70" width="70"&gt;
&lt;p align="center"&gt;&lt;b&gt;12&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td bgcolor="white" height="70" width="70"&gt;
&lt;p align="center"&gt;&lt;b&gt;61&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
1. 배열중 가장 작은 값을 찾아 첫 번째 값과 위치를 바꿉니다.&lt;br /&gt;
&lt;br /&gt;
2. 첫번째 값을 빼고 가장 작은 값을 찾아 두번째 값과 위치를 바꿉니다.&lt;br /&gt;
&lt;br /&gt;
3. 첫번째,두번째 값을 제외하고 가장 작은 값을 찾아 세번째 값과 위치를 바꿉니다.&lt;br /&gt;
&lt;br /&gt;
4. 다 될 때까지 반복 ㅡ,.ㅡ;;;&lt;br /&gt;
&lt;br /&gt;
어때요&lt;br /&gt;
&lt;img src="http://cfs4.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczQudGlzdG9yeS5jb206L2F0dGFjaC8wLzE1MDAwMDAwMDAwMi5naWY%3D" width="290" height="391" /&gt;&lt;br /&gt;
가장 쉬운 선택정렬입니다.&lt;br /&gt;
&lt;br /&gt;
아래는 C언어로 만든 소스입니다.&lt;br /&gt;
예전 글 &lt;a href="http://zfanta.com/335"&gt;난수 발생함수 rand(), 난수 범위 지정하기&lt;/a&gt;의 소스도 썼습니다.&lt;br /&gt;
&lt;br /&gt;
&lt;textarea class="c" name="code" style="margin-left: 0px; margin-right: 0px; width: 594px; margin-top: 1px; margin-bottom: 1px; height: 830px; "&gt;
#include &lt;stdlib.h&gt;
#include &lt;stdio.h&gt;  
#include &lt;time.h&gt;  
#include &lt;conio.h&gt;

int main()  
{  
	int a[100];  
	int start,end;  
	int max,min;  
	int count,count2;  
	int temp;

	srand((unsigned)time(NULL));  

	printf("시작 : ");  
	scanf("%d",&amp;start);  
	printf("종료 : ");  
	scanf("%d",&amp;end);  

	min=end;  
	max=start;  

	printf("정렬 전\n");
	for(count=0;count&lt;20;count++)  
	{  
		a[count]=rand() % (end - start + 1) + start;              
		printf("%3d",a[count]);  
	}

	/*여기부터*/
	for(count=0; count&lt;20-1; count++) 
	{ 
		min = count; 
		for(count2=count+1; count2&lt;20; count2++) 
			if(a[count2] &lt; a[min]) 
				min = count2;                  
		if(count != min) 
		{                    
			temp = a[min]; 
			a[min] = a[count]; 
			a[count] = temp; 
		} 
	} 
	/*여기까지 선택정렬입니다.*/

	printf("\n정렬 후\n");
	for(count=0;count&lt;20;count++)  
	{  
		printf("%3d",a[count]);  
	}

	getch();
	return 0;  
}&lt;/textarea&gt;&lt;div class="tt-plugin tt-share-entry-with-sns tt-sns-icon-alignment-right tt-sns-icon-size-small"&gt;
	&lt;div class="tt-sns-wrap" id="ttSnsWrap-"&gt;
		&lt;ul class="tt-sns-service-default"&gt;
			&lt;li class="tt-sns-service-mypeople"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('mypeople', '', '');"&gt;마이피플&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-twitter"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('twitter', '', '');"&gt;트위터&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-facebook"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('facebook', '', '');"&gt;페이스북&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-other"&gt;&lt;a href="javascript:;" onmouseover="ShareEntryWithSNS.showLayer(event, '');" onmouseout="ShareEntryWithSNS.hideLayer(event, '');"&gt;더보기&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
		&lt;ul class="tt-sns-service-more" id="ttSnsServiceMore-" onmouseout="ShareEntryWithSNS.hideLayer(event, '');"&gt;
			&lt;li class="tt-sns-service-me2day"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('me2day', '', '');"&gt;미투데이&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-yozm"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('yozm', '', '');"&gt;요즘&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/div&gt;
	&lt;div class="tt-sns-clear"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="blogger-news-widget" style="width: 100%; text-align: center"&gt;
		  					&lt;embed src="http://api.v.daum.net/static/recombox1.swf" quality="high" flashvars="nid=871172" allowscriptaccess="always" allowfullscreen="false" bgcolor="#ffffff" width="400" height="80" type="application/x-shockwave-flash" wmode="transparent"&gt;&lt;/embed&gt;
						&lt;/div&gt;&lt;div style="text-align:right; padding-top:10px;"&gt;
&lt;iframe src="http://www.facebook.com/plugins/like.php?href=zfanta.com/359&amp;amp;layout=button_count&amp;amp;show_faces=true&amp;amp;width=90&amp;amp;action=like&amp;amp;font=tahoma&amp;amp;colorscheme=light&amp;amp;height=65" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:65px;" allowTransparency="true"&gt;&lt;/iframe&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/zfanta/~4/IRHzEHQLp70" height="1" width="1"/&gt;</description>
			<category>algorithm</category>
			<category>Algorithm</category>
			<category>c</category>
			<category>C++</category>
			<category>Selection Sort</category>
			<category>선택정렬</category>
			<category>알고리즘</category>
			<author>　환타</author>
			<guid isPermaLink="false">http://zfanta.com/359</guid>
			<comments>http://zfanta.com/entry/%EC%A0%95%EB%A0%AC-%EC%95%8C%EA%B3%A0%EB%A6%AC%EC%A6%98-%EC%84%A0%ED%83%9D%EC%A0%95%EB%A0%AC-Selection-Sort#entry359comment</comments>
			<pubDate>Fri, 07 Mar 2008 18:12:18 +0900</pubDate>
		<feedburner:origLink>http://zfanta.com/359</feedburner:origLink></item>
		<item>
			<title>for문 10000번 VS 노가다 타이핑 10000번</title>
			<link>http://feedproxy.google.com/~r/zfanta/~3/gxnzm2wDy7E/347</link>
			<description>오늘은 for(count=0; count &amp;lt;10000; count++) VS 노가다 타이핑 10000번입니다.&lt;br /&gt;
&lt;br /&gt;
뭔 소린지 모르겠다 하시는 분은 아래 소스를 봐주세요.&lt;br /&gt;
&lt;br /&gt;
&lt;p id="more347_0" class="moreless_fold"&gt;&lt;span style="cursor: pointer;" onclick="toggleMoreLess(this, '347_0','for(count=0;count&amp;amp;lt;10000;count++)','for(count=0;count&amp;amp;lt;10000;count++)'); return false;"&gt;for(count=0;count&amp;lt;10000;count++)&lt;/span&gt;&lt;/p&gt;&lt;div id="content347_0" class="moreless_content" style="display: none;"&gt;&lt;textarea class="c" name="code" style="margin-left: 0px; margin-right: 0px; width: 485px; margin-top: 1px; margin-bottom: 1px; height: 167px; "&gt;#include &lt;stdio.h&gt;

main()
{
	int count;

	for(count=0;count&lt;10000;count++)
	{
		printf("zfanta.com\n");
	}
}&lt;/textarea&gt;&lt;/div&gt;&lt;br /&gt;
&lt;p id="more347_1" class="moreless_fold"&gt;&lt;span style="cursor: pointer;" onclick="toggleMoreLess(this, '347_1','그냥 10000번 (파일첨부로 수정)','그냥 10000번'); return false;"&gt;그냥 10000번 (파일첨부로 수정)&lt;/span&gt;&lt;/p&gt;&lt;div id="content347_1" class="moreless_content" style="display: none;"&gt;&lt;div class="imageblock left" style="float: left; margin-right: 10px;"&gt;&lt;a href="http://zfanta.tistory.com/attachment/gl130000000140.c"&gt;&lt;img src="http://i1.daumcdn.net/cfs.tistory/v/110706133414/blog/image/extension/unknown.gif" alt="" style="vertical-align: middle;" /&gt; main.c&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
파일정보 스샷&lt;br /&gt;
&lt;br /&gt;
&lt;img src="http://cfs6.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczYudGlzdG9yeS5jb206L2F0dGFjaC8xLzEzMDAwMDAwMDEzOS5qcGc%3D" width="425" height="471" /&gt;&lt;br /&gt;
for문.&lt;br /&gt;
&lt;br /&gt;
&lt;img src="http://cfs6.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczYudGlzdG9yeS5jb206L2F0dGFjaC8xLzEzMDAwMDAwMDEzOC5qcGc%3D" width="425" height="471" /&gt;&lt;br /&gt;
무작정 10000번&lt;br /&gt;
몇배차이?&lt;br /&gt;
&lt;br /&gt;
결론은&lt;br /&gt;
&lt;strong&gt;컴파일러는 멍청이.&lt;/strong&gt;&lt;div class="tt-plugin tt-share-entry-with-sns tt-sns-icon-alignment-right tt-sns-icon-size-small"&gt;
	&lt;div class="tt-sns-wrap" id="ttSnsWrap-"&gt;
		&lt;ul class="tt-sns-service-default"&gt;
			&lt;li class="tt-sns-service-mypeople"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('mypeople', '', '');"&gt;마이피플&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-twitter"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('twitter', '', '');"&gt;트위터&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-facebook"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('facebook', '', '');"&gt;페이스북&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-other"&gt;&lt;a href="javascript:;" onmouseover="ShareEntryWithSNS.showLayer(event, '');" onmouseout="ShareEntryWithSNS.hideLayer(event, '');"&gt;더보기&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
		&lt;ul class="tt-sns-service-more" id="ttSnsServiceMore-" onmouseout="ShareEntryWithSNS.hideLayer(event, '');"&gt;
			&lt;li class="tt-sns-service-me2day"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('me2day', '', '');"&gt;미투데이&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-yozm"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('yozm', '', '');"&gt;요즘&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/div&gt;
	&lt;div class="tt-sns-clear"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style="text-align:right; padding-top:10px;"&gt;
&lt;iframe src="http://www.facebook.com/plugins/like.php?href=zfanta.com/347&amp;amp;layout=button_count&amp;amp;show_faces=true&amp;amp;width=90&amp;amp;action=like&amp;amp;font=tahoma&amp;amp;colorscheme=light&amp;amp;height=65" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:65px;" allowTransparency="true"&gt;&lt;/iframe&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/zfanta/~4/gxnzm2wDy7E" height="1" width="1"/&gt;</description>
			<category>C/C++</category>
			<category>c</category>
			<category>C언어</category>
			<category>실험</category>
			<author>　환타</author>
			<guid isPermaLink="false">http://zfanta.com/347</guid>
			<comments>http://zfanta.com/entry/for%EB%AC%B8-10000%EB%B2%88-VS-%EB%85%B8%EA%B0%80%EB%8B%A4-%ED%83%80%EC%9D%B4%ED%95%91-10000%EB%B2%88#entry347comment</comments>
			<pubDate>Fri, 22 Feb 2008 17:19:37 +0900</pubDate>
		<feedburner:origLink>http://zfanta.com/347</feedburner:origLink></item>
		<item>
			<title>프로그램 실행시간 측정하기</title>
			<link>http://feedproxy.google.com/~r/zfanta/~3/B8hAH2umyJA/345</link>
			<description>&lt;textarea class="c" name="code" style="margin-left: 0px; margin-right: 0px; width: 455px; margin-top: 1px; margin-bottom: 1px; height: 317px; "&gt;
#include &lt;stdio.h&gt;
#include &lt;time.h&gt;
main()
{
	clock_t start, end;
	int count,a;
	double result;

	start = clock();
	for(count=0;count&lt;10000;count++)
		printf(" ");

	end = clock();

	result = (double)(end-start) / CLOCKS_PER_SEC;

	printf("%f",result);
}&lt;/textarea&gt;&lt;br /&gt;
2번 줄처럼 #include &amp;lt;time.h&gt;를 넣어줘야돼요.&lt;br /&gt;
start,end 변수는 clock_t 로 선언하고 &lt;br /&gt;
측정 시작하고싶은 곳에 12번 줄처럼 해주시고 측정 끝내고 싶은 곳에 16번째 줄처럼 해주시면 됩니다.&lt;br /&gt;
&lt;textarea class="c" name="code" style="margin-left: 0px; margin-right: 0px; width: 580px; margin-top: 1px; margin-bottom: 1px; height: 45px; "&gt;
start = clock();
end = clock();
&lt;/textarea&gt;&lt;br /&gt;
end-start 하면 실행시간을 알 수있는데 CLOCKS_PER_SEC로 나누어 줘야 해요.&lt;br /&gt;
&lt;textarea class="c" name="code" style="margin-left: 0px; margin-right: 0px; width: 581px; "&gt;
result = (double)(end-start) / CLOCKS_PER_SEC;
&lt;/textarea&gt;&lt;br /&gt;
&lt;br /&gt;
오늘은 간단하게 이거만..........&lt;br /&gt;
&lt;div class="imageblock left" style="float: left; margin-right: 10px;"&gt;&lt;a href="http://cfs5.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczUudGlzdG9yeS5jb206L2F0dGFjaC8xLzEzMDAwMDAwMDE0OC5qcGc%3D" rel="lightbox" target="_blank"&gt;&lt;img src="http://cfs5.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczUudGlzdG9yeS5jb206L2F0dGFjaC8xLzEzMDAwMDAwMDE0OC5qcGc%3D" alt="사용자 삽입 이미지" height="436" width="669"/&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="tt-plugin tt-share-entry-with-sns tt-sns-icon-alignment-right tt-sns-icon-size-small"&gt;
	&lt;div class="tt-sns-wrap" id="ttSnsWrap-"&gt;
		&lt;ul class="tt-sns-service-default"&gt;
			&lt;li class="tt-sns-service-mypeople"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('mypeople', '', '');"&gt;마이피플&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-twitter"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('twitter', '', '');"&gt;트위터&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-facebook"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('facebook', '', '');"&gt;페이스북&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-other"&gt;&lt;a href="javascript:;" onmouseover="ShareEntryWithSNS.showLayer(event, '');" onmouseout="ShareEntryWithSNS.hideLayer(event, '');"&gt;더보기&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
		&lt;ul class="tt-sns-service-more" id="ttSnsServiceMore-" onmouseout="ShareEntryWithSNS.hideLayer(event, '');"&gt;
			&lt;li class="tt-sns-service-me2day"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('me2day', '', '');"&gt;미투데이&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-yozm"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('yozm', '', '');"&gt;요즘&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/div&gt;
	&lt;div class="tt-sns-clear"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style="text-align:right; padding-top:10px;"&gt;
&lt;iframe src="http://www.facebook.com/plugins/like.php?href=zfanta.com/345&amp;amp;layout=button_count&amp;amp;show_faces=true&amp;amp;width=90&amp;amp;action=like&amp;amp;font=tahoma&amp;amp;colorscheme=light&amp;amp;height=65" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:65px;" allowTransparency="true"&gt;&lt;/iframe&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/zfanta/~4/B8hAH2umyJA" height="1" width="1"/&gt;</description>
			<category>C/C++</category>
			<category>c</category>
			<category>time.h</category>
			<category>프로그램</category>
			<author>　환타</author>
			<guid isPermaLink="false">http://zfanta.com/345</guid>
			<comments>http://zfanta.com/entry/%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%A8-%EC%8B%A4%ED%96%89%EC%8B%9C%EA%B0%84-%EC%B8%A1%EC%A0%95%ED%95%98%EA%B8%B0#entry345comment</comments>
			<pubDate>Thu, 21 Feb 2008 16:45:43 +0900</pubDate>
		<feedburner:origLink>http://zfanta.com/345</feedburner:origLink></item>
		<item>
			<title>난수 발생함수 rand(), 난수 범위 지정하기</title>
			<link>http://feedproxy.google.com/~r/zfanta/~3/ZQAsgzARnS0/335</link>
			<description>프로그래밍 카테고리에도 글이 좀 쌓이는 것 같다. (8개?)&lt;br /&gt;
&lt;br /&gt;
난수 발생의 범위를 지정하는 방법, 요렇게&lt;br /&gt;
&lt;strong&gt;&lt;font size="4"&gt;변수 = rand() % (종료 값 - 시작 값 + 1) + 시작 값&lt;/font&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;br /&gt;
100부터 1000 사이의 난수를 발생시키려면&lt;br /&gt;
&lt;strong&gt;변수 = rand() % (1000 - 100 + 1) + 100&lt;br /&gt;
&lt;/strong&gt;간단히 하면&lt;br /&gt;
&lt;strong&gt;변수 = rand() % (901) + 100&lt;br /&gt;
&lt;/strong&gt;이렇게 되지요.&lt;br /&gt;
&lt;br /&gt;
이건 난수 1,000개를 발생시켜서 최소값, 최대값 출력하는 소스.&lt;br /&gt;
&lt;br /&gt;
&lt;textarea class="c" name="code" style="margin-left: 0px; margin-right: 0px; width: 521px; margin-top: 1px; margin-bottom: 1px; height: 551px; "&gt;
#include &lt;stdio.h&gt;
#include &lt;time.h&gt;
int main()
{
	int a;
	int start,end;
	int max,min;
	int count;

	srand((unsigned)time(NULL));

	printf("시작 : ");
	scanf("%d",&amp;start);
	printf("종료 : ");
	scanf("%d",&amp;end);

	min=end;
	max=start;

	for(count=0;count&lt;1000;count++)
	{
		a=rand() % (end - start + 1) + start;
		printf("%4d ",a);

		if(min &gt; a)
			min=a;
		if(max &lt; a)
			max=a;
	}

	printf("\n최소 : %d",min);
	printf("\n최대 : %d",max);

	getch();
	return 0;
}&lt;/textarea&gt;&lt;br /&gt;
&lt;div class="imageblock center" style="text-align: center; clear: both;"&gt;&lt;a href="http://cfs6.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczYudGlzdG9yeS5jb206L2F0dGFjaC8xLzEzMDAwMDAwMDEzMC5qcGc%3D" rel="lightbox" target="_blank"&gt;&lt;img src="http://cfs6.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczYudGlzdG9yeS5jb206L2F0dGFjaC8xLzEzMDAwMDAwMDEzMC5qcGc%3D" alt="사용자 삽입 이미지" class="tt-resampling" height="435" width="669"/&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
널려 있는 정보지만, 아니 뭐 그냥 그렇다구요. ㅜㅜ&lt;div class="tt-plugin tt-share-entry-with-sns tt-sns-icon-alignment-right tt-sns-icon-size-small"&gt;
	&lt;div class="tt-sns-wrap" id="ttSnsWrap-"&gt;
		&lt;ul class="tt-sns-service-default"&gt;
			&lt;li class="tt-sns-service-mypeople"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('mypeople', '', '');"&gt;마이피플&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-twitter"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('twitter', '', '');"&gt;트위터&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-facebook"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('facebook', '', '');"&gt;페이스북&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-other"&gt;&lt;a href="javascript:;" onmouseover="ShareEntryWithSNS.showLayer(event, '');" onmouseout="ShareEntryWithSNS.hideLayer(event, '');"&gt;더보기&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
		&lt;ul class="tt-sns-service-more" id="ttSnsServiceMore-" onmouseout="ShareEntryWithSNS.hideLayer(event, '');"&gt;
			&lt;li class="tt-sns-service-me2day"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('me2day', '', '');"&gt;미투데이&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-yozm"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('yozm', '', '');"&gt;요즘&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/div&gt;
	&lt;div class="tt-sns-clear"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style="text-align:right; padding-top:10px;"&gt;
&lt;iframe src="http://www.facebook.com/plugins/like.php?href=zfanta.com/335&amp;amp;layout=button_count&amp;amp;show_faces=true&amp;amp;width=90&amp;amp;action=like&amp;amp;font=tahoma&amp;amp;colorscheme=light&amp;amp;height=65" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:65px;" allowTransparency="true"&gt;&lt;/iframe&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/zfanta/~4/ZQAsgzARnS0" height="1" width="1"/&gt;</description>
			<category>C/C++</category>
			<category>c</category>
			<category>C언어</category>
			<category>rand</category>
			<category>random</category>
			<category>난수</category>
			<category>함수</category>
			<author>　환타</author>
			<guid isPermaLink="false">http://zfanta.com/335</guid>
			<comments>http://zfanta.com/entry/%EB%82%9C%EC%88%98-%EB%B0%9C%EC%83%9D%ED%95%A8%EC%88%98-rand-%EB%82%9C%EC%88%98-%EB%B2%94%EC%9C%84-%EC%A7%80%EC%A0%95%ED%95%98%EA%B8%B0#entry335comment</comments>
			<pubDate>Fri, 15 Feb 2008 17:21:34 +0900</pubDate>
		<feedburner:origLink>http://zfanta.com/335</feedburner:origLink></item>
		<item>
			<title>C언어로 오목만들기 5 마지막.</title>
			<link>http://feedproxy.google.com/~r/zfanta/~3/gIr1pbafuIw/333</link>
			<description>오랜만에 오목포스팅 드디어 끝이다.&lt;br /&gt;
5번만에 끝나니 좀 아쉬워, 좀 더 우려먹으려고 했는데.&lt;br /&gt;
&lt;br /&gt;
이번에 추가한 건   흑,백추가(이게 전부  ㅡ,.ㅡ)&lt;br /&gt;
&lt;br /&gt;
1. 돌 5개 확인 함수 변경하기.&lt;br /&gt;
예전엔 돌 하나로도 잘 놀았지만 이젠 흑,백이 추가됐으니 인자 하나를 더 전달해 주어야 해요.&lt;br /&gt;
int check(x,y)함수를 변경해줍니다.&lt;br /&gt;
&lt;textarea class="c" name="code" style="margin-left: 0px; margin-right: 0px; width: 692px; margin-top: 1px; margin-bottom: 1px; height: 1179px; "&gt;
int check(x,y,turn)
{
	int px,py;
	int count;
	//가로
	px=x;
	py=y;
	count=0;    

	while(px&gt;1 &amp;&amp; board[px-2][y] == turn)px-=2;
	while(px&lt;=36 &amp;&amp; board[px][y] == turn)
	{
		count++;
		px+=2;
	}

	if(count==5)
	{
		return 1;
	}

	//세로
	px=x;
	py=y;
	count=0;

	while(py&gt;0 &amp;&amp; board[x][py-1]==turn)py--;
	while(py&lt;=18 &amp;&amp; board[x][py++]==turn)count++;

	if(count==5)
	{
		return 1;
	}

	//대각선 ↘
	px=x;
	py=y;
	count=0;

	while(px &gt; 0 &amp;&amp; py &gt; 0 &amp;&amp; board[px-2][py-1]==turn)
	{
		px-=2;
		py--;
	}

	while(px&lt;=36 &amp;&amp; py&lt;=18 &amp;&amp; board[px][py++] == turn)
	{
		px+=2;
		count++;
	}
	if(count==5)
	{
		return 1;
	}

	//대각선 ↙
	px=x;
	py=y;
	count=0;

	while(px &lt; 36 &amp;&amp; py &gt; 0 &amp;&amp; board[px+2][py-1]==turn)
	{
		px+=2;
		py--;
	}

	while(px&gt;=0 &amp;&amp; py&lt;=18 &amp;&amp; board[px][py++] == turn)
	{
		px-=2;
		count++;
	}
	if(count==5)
	{
		return 1;
	}
	return 0;
}
&lt;/textarea&gt;
&lt;br /&gt;
2.문자열 "흑","백"도 추가, 흑돌,백돌도 추가&lt;br /&gt;
&lt;textarea class="c" name="code" style="margin-top: 1px; margin-bottom: 1px; height: 66px; margin-left: 0px; margin-right: 0px; width: 426px; "&gt;
int turn=1;
char who[3][3]={"","흑","백"};
char stone[3][3]={"","○","●"};
&lt;/textarea&gt;
&lt;br /&gt;
3.case ENTER: 부분도 수정&lt;br /&gt;
&lt;textarea class="c" name="code" style="margin-top: 1px; margin-bottom: 1px; height: 305px; margin-left: 0px; margin-right: 0px; width: 584px; "&gt;
case ENTER :
	if(board[x][y] == 0)
	{
		board[x][y]=turn;
		gotoxy(x,y);
		puts(stone[turn]);
		if(check(x,y,turn))
		{
			system("CLS");
			printf("%s 승리",who[turn]);
			system("PAUSE");
			exit(0);
		}
		turn++;
		if(turn==3)
			turn=1;
	}
	break;
&lt;/textarea&gt;
&lt;br /&gt;
4.마지막 오목소스&lt;br /&gt;
&lt;textarea class="c" name="code" style="margin-left: 0px; margin-right: 0px; width: 678px; margin-top: 1px; margin-bottom: 1px; height: 5085px; "&gt;
#include &lt;stdio.h&gt;
#include &lt;windows.h&gt;
#define UP 72
#define DOWN 80
#define LEFT 75
#define RIGHT 77
#define ENTER 13

int x=0,y=0;
int oldx=0,oldy=0;
int board[38][19];
int turn=1;
char who[3][3]={"","흑","백"};
char stone[3][3]={"","○","●"}; 

void gotoxy(int, int);
void draw();
void move();
int knock(int,int);
int check(int,int,int);

int main()
{
	draw();
	while(1)
	{
		move();
	}


	system("PAUSE");    
	return 0;
}

void gotoxy(int x, int y) 
{
	COORD XY = {x, y};
	SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), XY);
}

void draw()
{        
	char a[39][39]=
	{
		"┌┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┐",
		"├┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┤",
		"└┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┘"
	};
	int count;
	printf("%s\n",a[0]); 
	for(count=0;count&lt;17;count++)
		printf("%s\n",a[1]);
	printf("%s",a[2]);
}

void move()
{
	char input=0;
	input=getch();

	switch(input)
	{
	case UP :
		if(y&gt;0)
		{
			y-=1;
			oldy=y+1;
			gotoxy(x,y);
			puts("⊙");
			if(knock(x,oldy))
			{
				gotoxy(x,oldy);
				if(oldy==18)
				{
					if(x==0)
					{
						puts("└");
					}
					if(x==36)
					{
						puts("┘");
					}
					else if(x!=0&amp;&amp;x!=36)
					{
						puts("┴");
					}
				}
				else if(x==0)
				{
					puts("├");
				}
				else if(x==36)
				{
					puts("┤");
				}
				else
				{
					puts("┼");
				}
			}

		}
		break;

	case DOWN :
		if(y&lt;18)
		{
			y+=1;
			oldy=y-1;
			gotoxy(x,y);
			puts("⊙");
			if(knock(x,oldy))
			{
				gotoxy(x,oldy);
				if(oldy==0)
				{
					if(x==0)
					{
						puts("┌");
					}
					if(x==36)
					{
						puts("┐");
					}
					else if(x!=0&amp;&amp;x!=36)
					{
						puts("┬");
					}
				}
				else if(x==0)
				{
					puts("├");
				}
				else if(x==36)
				{
					puts("┤");
				}
				else
				{
					puts("┼");
				}
			}

		}
		break;

	case LEFT :
		if(x&gt;0)
		{
			x-=2;
			oldx=x+2;
			gotoxy(x,y);
			puts("⊙");
			if(knock(oldx,y))
			{
				gotoxy(oldx,y);
				if(oldx==36)
				{
					if(y==0)
					{
						puts("┐");
					}
					if(y==18)
					{
						puts("┘");
					}
					else if(y!=0&amp;&amp;y!=36)
					{
						puts("┤");
					}
				}
				else if(y==18)
				{
					puts("┴");
				}
				else if(y==0)
				{
					puts("┬");
				}
				else
				{
					puts("┼");
				}
			}

		}
		break;

	case RIGHT :
		if(x&lt;36)
		{
			x+=2;
			oldx=x-2;
			gotoxy(x,y);
			puts("⊙");
			if(knock(oldx,y))
			{
				gotoxy(oldx,y);
				if(oldx==0)
				{
					if(y==0)
					{
						puts("┌");
					}
					if(y==18)
					{
						puts("└");
					}
					else if(y!=0&amp;&amp;y!=36)
					{
						puts("├");
					}
				}
				else if(y==18)
				{
					puts("┴");
				}
				else if(y==0)
				{
					puts("┬");
				}
				else
				{
					puts("┼");
				}
			}

		}
		break;
	case ENTER :
		if(board[x][y] == 0)
		{ 
			board[x][y]=turn;
			gotoxy(x,y);
			puts(stone[turn]);
			if(check(x,y,turn))
			{
				system("CLS");
				printf("%s 승리",who[turn]);
				system("PAUSE");
				exit(0);
			}
			turn++;
			if(turn==3)
				turn=1;
		}   
		break;
	}
}
int knock(x,y)
{
	gotoxy(x,y);
	puts(stone[board[x][y]]);
	if(board[x][y]!=0)
		return 0;

	else
		return 1;
}
int check(x,y,turn)
{
	int px,py;
	int count;
	//가로
	px=x;
	py=y;
	count=0;    

	while(px&gt;1 &amp;&amp; board[px-2][y] == turn)px-=2;
	while(px&lt;=36 &amp;&amp; board[px][y] == turn)
	{
		count++;
		px+=2;
	}

	if(count==5)
	{
		return 1;
	}

	//세로
	px=x;
	py=y;
	count=0;

	while(py&gt;0 &amp;&amp; board[x][py-1]==turn)py--;
	while(py&lt;=18 &amp;&amp; board[x][py++]==turn)count++;

	if(count==5)
	{
		return 1;
	}

	//대각선 ↘
	px=x;
	py=y;
	count=0;

	while(px &gt; 0 &amp;&amp; py &gt; 0 &amp;&amp; board[px-2][py-1]==turn)
	{
		px-=2;
		py--;
	}

	while(px&lt;=36 &amp;&amp; py&lt;=18 &amp;&amp; board[px][py++] == turn)
	{
		px+=2;
		count++;
	}
	if(count==5)
	{
		return 1;
	}

	//대각선 ↙
	px=x;
	py=y;
	count=0;

	while(px &lt; 36 &amp;&amp; py &gt; 0 &amp;&amp; board[px+2][py-1]==turn)
	{
		px+=2;
		py--;
	}

	while(px&gt;=0 &amp;&amp; py&lt;=18 &amp;&amp; board[px][py++] == turn)
	{
		px-=2;
		count++;
	}
	if(count==5)
	{
		return 1;
	}
	return 0;
}
&lt;/textarea&gt;
&lt;div class="imageblock center" style="text-align: center; clear: both;"&gt;&lt;a href="http://cfs5.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczUudGlzdG9yeS5jb206L2F0dGFjaC8xLzEzMDAwMDAwMDE0Mi5naWY%3D" rel="lightbox" target="_blank"&gt;&lt;img src="http://cfs5.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczUudGlzdG9yeS5jb206L2F0dGFjaC8xLzEzMDAwMDAwMDE0Mi5naWY%3D" alt="사용자 삽입 이미지" height="436" width="669"/&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
이걸로 끝.&lt;br /&gt;
부족한 점이나 질문 있으시면 아래 리플로 ㄱㄱ&lt;br /&gt;&lt;div class="tt-plugin tt-share-entry-with-sns tt-sns-icon-alignment-right tt-sns-icon-size-small"&gt;
	&lt;div class="tt-sns-wrap" id="ttSnsWrap-"&gt;
		&lt;ul class="tt-sns-service-default"&gt;
			&lt;li class="tt-sns-service-mypeople"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('mypeople', '', '');"&gt;마이피플&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-twitter"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('twitter', '', '');"&gt;트위터&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-facebook"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('facebook', '', '');"&gt;페이스북&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-other"&gt;&lt;a href="javascript:;" onmouseover="ShareEntryWithSNS.showLayer(event, '');" onmouseout="ShareEntryWithSNS.hideLayer(event, '');"&gt;더보기&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
		&lt;ul class="tt-sns-service-more" id="ttSnsServiceMore-" onmouseout="ShareEntryWithSNS.hideLayer(event, '');"&gt;
			&lt;li class="tt-sns-service-me2day"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('me2day', '', '');"&gt;미투데이&lt;/a&gt;&lt;/li&gt;
			&lt;li class="tt-sns-service-yozm"&gt;&lt;a href="javascript:;" onclick="ShareEntryWithSNS.share('yozm', '', '');"&gt;요즘&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/div&gt;
	&lt;div class="tt-sns-clear"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="blogger-news-widget" style="width: 100%; text-align: center"&gt;
		  					&lt;embed src="http://api.v.daum.net/static/recombox1.swf" quality="high" flashvars="nid=779069" allowscriptaccess="always" allowfullscreen="false" bgcolor="#ffffff" width="400" height="80" type="application/x-shockwave-flash" wmode="transparent"&gt;&lt;/embed&gt;
						&lt;/div&gt;&lt;div style="text-align:right; padding-top:10px;"&gt;
&lt;iframe src="http://www.facebook.com/plugins/like.php?href=zfanta.com/333&amp;amp;layout=button_count&amp;amp;show_faces=true&amp;amp;width=90&amp;amp;action=like&amp;amp;font=tahoma&amp;amp;colorscheme=light&amp;amp;height=65" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:65px;" allowTransparency="true"&gt;&lt;/iframe&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/zfanta/~4/gIr1pbafuIw" height="1" width="1"/&gt;</description>
			<category>C/C++</category>
			<category>C언어</category>
			<category>소스</category>
			<category>오목</category>
			<category>오목게임</category>
			<author>　환타</author>
			<guid isPermaLink="false">http://zfanta.com/333</guid>
			<comments>http://zfanta.com/entry/C%EC%96%B8%EC%96%B4%EB%A1%9C-%EC%98%A4%EB%AA%A9%EB%A7%8C%EB%93%A4%EA%B8%B0-5-%EB%A7%88%EC%A7%80%EB%A7%89#entry333comment</comments>
			<pubDate>Thu, 14 Feb 2008 16:06:28 +0900</pubDate>
		<feedburner:origLink>http://zfanta.com/333</feedburner:origLink></item>
	</channel>
</rss>

