<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://mediawiki.zeropage.org/index.php?action=history&amp;feed=atom&amp;title=%EB%8D%B0%EB%B8%94%EC%8A%A4%EC%BA%A0%ED%94%842009%2F%EB%AA%A9%EC%9A%94%EC%9D%BC%2F%EC%97%B0%EC%8A%B5%EB%AC%B8%EC%A0%9C%2F%EB%8B%A4%EB%B9%88%EC%B9%98%EC%BD%94%EB%93%9C%2F%EB%B0%95%EC%A4%80%ED%98%B8</id>
	<title>데블스캠프2009/목요일/연습문제/다빈치코드/박준호 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://mediawiki.zeropage.org/index.php?action=history&amp;feed=atom&amp;title=%EB%8D%B0%EB%B8%94%EC%8A%A4%EC%BA%A0%ED%94%842009%2F%EB%AA%A9%EC%9A%94%EC%9D%BC%2F%EC%97%B0%EC%8A%B5%EB%AC%B8%EC%A0%9C%2F%EB%8B%A4%EB%B9%88%EC%B9%98%EC%BD%94%EB%93%9C%2F%EB%B0%95%EC%A4%80%ED%98%B8"/>
	<link rel="alternate" type="text/html" href="https://mediawiki.zeropage.org/index.php?title=%EB%8D%B0%EB%B8%94%EC%8A%A4%EC%BA%A0%ED%94%842009/%EB%AA%A9%EC%9A%94%EC%9D%BC/%EC%97%B0%EC%8A%B5%EB%AC%B8%EC%A0%9C/%EB%8B%A4%EB%B9%88%EC%B9%98%EC%BD%94%EB%93%9C/%EB%B0%95%EC%A4%80%ED%98%B8&amp;action=history"/>
	<updated>2026-05-16T03:22:38Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.8</generator>
	<entry>
		<id>https://mediawiki.zeropage.org/index.php?title=%EB%8D%B0%EB%B8%94%EC%8A%A4%EC%BA%A0%ED%94%842009/%EB%AA%A9%EC%9A%94%EC%9D%BC/%EC%97%B0%EC%8A%B5%EB%AC%B8%EC%A0%9C/%EB%8B%A4%EB%B9%88%EC%B9%98%EC%BD%94%EB%93%9C/%EB%B0%95%EC%A4%80%ED%98%B8&amp;diff=46366&amp;oldid=prev</id>
		<title>165.194.17.116 at 20:27, 25 June 2009</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.zeropage.org/index.php?title=%EB%8D%B0%EB%B8%94%EC%8A%A4%EC%BA%A0%ED%94%842009/%EB%AA%A9%EC%9A%94%EC%9D%BC/%EC%97%B0%EC%8A%B5%EB%AC%B8%EC%A0%9C/%EB%8B%A4%EB%B9%88%EC%B9%98%EC%BD%94%EB%93%9C/%EB%B0%95%EC%A4%80%ED%98%B8&amp;diff=46366&amp;oldid=prev"/>
		<updated>2009-06-25T20:27:10Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;=  데블스캠프2009/목요일/연습문제/다빈치코드/박준호  =&lt;br /&gt;
 #include &amp;amp;lt;stdio.h&amp;amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 int index = 0;&lt;br /&gt;
 char color;&lt;br /&gt;
 int num;&lt;br /&gt;
 int b_block[13] = {0 , 1 , 2, 3, 4, 5, 6 , 7, 8, 9, 10, 11, -1};&lt;br /&gt;
 int w_block[13] = {0 ,1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ,11 ,-1};&lt;br /&gt;
 	int cardnum = 3;&lt;br /&gt;
 struct hand{&lt;br /&gt;
 	int number; &lt;br /&gt;
 	char color1;&lt;br /&gt;
 };&lt;br /&gt;
 typedef struct hand hand;&lt;br /&gt;
 hand handsort[13];&lt;br /&gt;
 &lt;br /&gt;
 	&lt;br /&gt;
 void CmpColor(hand handsort[], int i);&lt;br /&gt;
 &lt;br /&gt;
 void CmpNum();&lt;br /&gt;
 &lt;br /&gt;
 void DrawCard(hand hand[], int index);&lt;br /&gt;
 &lt;br /&gt;
 int main()&lt;br /&gt;
 {&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 	&lt;br /&gt;
 	&lt;br /&gt;
 &lt;br /&gt;
 		&lt;br /&gt;
 	for(index = 0; index &amp;amp;lt;= cardnum; index++)&lt;br /&gt;
 	{&lt;br /&gt;
 		DrawCard(handsort,index);&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 	CmpNum();&lt;br /&gt;
 	for(index = 0; index &amp;amp;lt;= cardnum; index ++)&lt;br /&gt;
 	{&lt;br /&gt;
 		printf(&amp;quot;%c%d &amp;quot;,handsort[index].color1, handsort[index].number);&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 &lt;br /&gt;
 	return 0;&lt;br /&gt;
 &lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 void DrawCard(hand handsort[], int index)&lt;br /&gt;
 {&lt;br /&gt;
 	printf(&amp;quot;받고 싶으신 색과 숫자를 적으시오.&amp;quot;);&lt;br /&gt;
 	fflush(stdin);&lt;br /&gt;
 	scanf(&amp;quot;%c %d&amp;quot;, &amp;amp;amp;color, &amp;amp;amp;num);&lt;br /&gt;
 	if (color == &amp;#039;w&amp;#039;){&lt;br /&gt;
 		handsort[index].number = w_block[num];&lt;br /&gt;
 		handsort[index].color1 = &amp;#039;w&amp;#039;;&lt;br /&gt;
 	}&lt;br /&gt;
 	else if(color == &amp;#039;b&amp;#039;){&lt;br /&gt;
 		handsort[index].number = b_block[num];&lt;br /&gt;
 		handsort[index].color1 = &amp;#039;b&amp;#039;;&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 void CmpColor(hand handsort[],int i)&lt;br /&gt;
 {&lt;br /&gt;
 	char a;&lt;br /&gt;
 	int b;&lt;br /&gt;
 	if(handsort[i].color1 == &amp;#039;w&amp;#039;)&lt;br /&gt;
 	{&lt;br /&gt;
 		a = handsort[i].color1;&lt;br /&gt;
 		handsort[i].color1 = handsort[i+1].color1;&lt;br /&gt;
 		handsort[i+1].color1 = a;&lt;br /&gt;
 		b = handsort[i].number;&lt;br /&gt;
 		handsort[i].number = handsort[i+1].number;&lt;br /&gt;
 		handsort[i+1].number = b;&lt;br /&gt;
 	//swap		&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 void CmpNum(){&lt;br /&gt;
 	int i =0, j = cardnum;&lt;br /&gt;
 	int a = 0;&lt;br /&gt;
 	char b;&lt;br /&gt;
 	for(j = (cardnum - 1); j &amp;amp;gt;= 0; j--)&lt;br /&gt;
 	{&lt;br /&gt;
 		for(i = 0; i &amp;amp;lt;= j; i++)&lt;br /&gt;
 		{&lt;br /&gt;
 			if(handsort[i].number &amp;amp;gt;= handsort[(i+1)].number)&lt;br /&gt;
 			{&lt;br /&gt;
 				if(handsort[i].number == handsort[i+1].number)&lt;br /&gt;
 				{&lt;br /&gt;
 					CmpColor(handsort, i);&lt;br /&gt;
 				}&lt;br /&gt;
 				else{&lt;br /&gt;
 					a = handsort[i].number;&lt;br /&gt;
 					handsort[i].number =handsort[(i+1)].number;&lt;br /&gt;
 					handsort[i+1].number = a;&lt;br /&gt;
 					b = handsort[i].color1;&lt;br /&gt;
 					handsort[i].color1 = handsort[i+1].color1;&lt;br /&gt;
 					handsort[i+1].color1 = b;&lt;br /&gt;
 				//swap&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&gt;</summary>
		<author><name>165.194.17.116</name></author>
	</entry>
</feed>