<div class="colorscripter-code" style="font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;color:#010101;overflow:auto;"> <table class="colorscripter-code-table" style="border-bottom:medium none;border-left:medium none;padding-bottom:0px;background-color:#fafafa;margin:0px;padding-left:0px;padding-right:0px;border-top:medium none;border-right:medium none;padding-top:0px;" cellspacing="0" cellpadding="0"><tbody><tr><td style="padding-bottom:6px;padding-left:6px;padding-right:6px;border-right:#e5e5e5 2px solid;padding-top:6px;"> <div style="text-align:right;padding-bottom:0px;line-height:130%;margin:0px;padding-left:0px;padding-right:0px;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;color:#666;padding-top:0px;"> <div style="line-height:130%;">1</div> <div style="line-height:130%;">2</div> <div style="line-height:130%;">3</div> <div style="line-height:130%;">4</div> <div style="line-height:130%;">5</div> <div style="line-height:130%;">6</div> <div style="line-height:130%;">7</div> <div style="line-height:130%;">8</div> <div style="line-height:130%;">9</div> <div style="line-height:130%;">10</div> <div style="line-height:130%;">11</div> <div style="line-height:130%;">12</div> <div style="line-height:130%;">13</div> <div style="line-height:130%;">14</div> <div style="line-height:130%;">15</div> <div style="line-height:130%;">16</div> <div style="line-height:130%;">17</div> <div style="line-height:130%;">18</div> <div style="line-height:130%;">19</div> <div style="line-height:130%;">20</div> <div style="line-height:130%;">21</div> <div style="line-height:130%;">22</div> <div style="line-height:130%;">23</div> <div style="line-height:130%;">24</div> <div style="line-height:130%;">25</div> <div style="line-height:130%;">26</div> <div style="line-height:130%;">27</div> <div style="line-height:130%;">28</div></div></td> <td style="padding-bottom:6px;padding-left:0px;padding-right:0px;padding-top:6px;"> <div style="padding-bottom:0px;line-height:130%;margin:0px;padding-left:0px;padding-right:0px;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;color:#010101;padding-top:0px;"> <div style="padding-bottom:0px;line-height:130%;padding-left:6px;padding-right:6px;white-space:pre;padding-top:0px;">#include <stdio.h></div> <div style="padding-bottom:0px;line-height:130%;padding-left:6px;padding-right:6px;white-space:pre;padding-top:0px;">int main(void)</div> <div style="padding-bottom:0px;line-height:130%;padding-left:6px;padding-right:6px;white-space:pre;padding-top:0px;">{</div> <div style="padding-bottom:0px;line-height:130%;padding-left:6px;padding-right:6px;white-space:pre;padding-top:0px;"> int i,j,k, num, count=0;</div> <div style="padding-bottom:0px;line-height:130%;padding-left:6px;padding-right:6px;white-space:pre;padding-top:0px;"> </div> <div style="padding-bottom:0px;line-height:130%;padding-left:6px;padding-right:6px;white-space:pre;padding-top:0px;"> printf("몇개출력: "); </div> <div style="padding-bottom:0px;line-height:130%;padding-left:6px;padding-right:6px;white-space:pre;padding-top:0px;"> scanf("%d",&num);</div> <div style="padding-bottom:0px;line-height:130%;padding-left:6px;padding-right:6px;white-space:pre;padding-top:0px;"> </div> <div style="padding-bottom:0px;line-height:130%;padding-left:6px;padding-right:6px;white-space:pre;padding-top:0px;"> for(i=1; i<=1000; i++)</div> <div style="padding-bottom:0px;line-height:130%;padding-left:6px;padding-right:6px;white-space:pre;padding-top:0px;"> {</div> <div style="padding-bottom:0px;line-height:130%;padding-left:6px;padding-right:6px;white-space:pre;padding-top:0px;"> for(j=i; j<=1000; j++)</div> <div style="padding-bottom:0px;line-height:130%;padding-left:6px;padding-right:6px;white-space:pre;padding-top:0px;"> {</div> <div style="padding-bottom:0px;line-height:130%;padding-left:6px;padding-right:6px;white-space:pre;padding-top:0px;"> for(k=1; k<=1000; k++)</div> <div style="padding-bottom:0px;line-height:130%;padding-left:6px;padding-right:6px;white-space:pre;padding-top:0px;"> {</div> <div style="padding-bottom:0px;line-height:130%;padding-left:6px;padding-right:6px;white-space:pre;padding-top:0px;"> if(k*k==(i*i+j*j)) </div> <div style="padding-bottom:0px;line-height:130%;padding-left:6px;padding-right:6px;white-space:pre;padding-top:0px;"> {</div> <div style="padding-bottom:0px;line-height:130%;padding-left:6px;padding-right:6px;white-space:pre;padding-top:0px;"> printf("%3d: %3d %3d %3d\n",count+1,i,j,k);</div> <div style="padding-bottom:0px;line-height:130%;padding-left:6px;padding-right:6px;white-space:pre;padding-top:0px;"> count++;</div> <div style="padding-bottom:0px;line-height:130%;padding-left:6px;padding-right:6px;white-space:pre;padding-top:0px;"> }</div> <div style="padding-bottom:0px;line-height:130%;padding-left:6px;padding-right:6px;white-space:pre;padding-top:0px;"> }</div> <div style="padding-bottom:0px;line-height:130%;padding-left:6px;padding-right:6px;white-space:pre;padding-top:0px;"> }</div> <div style="padding-bottom:0px;line-height:130%;padding-left:6px;padding-right:6px;white-space:pre;padding-top:0px;"> if(count==num)</div> <div style="padding-bottom:0px;line-height:130%;padding-left:6px;padding-right:6px;white-space:pre;padding-top:0px;"> break;</div> <div style="padding-bottom:0px;line-height:130%;padding-left:6px;padding-right:6px;white-space:pre;padding-top:0px;"> }</div> <div style="padding-bottom:0px;line-height:130%;padding-left:6px;padding-right:6px;white-space:pre;padding-top:0px;"> return 0;</div> <div style="padding-bottom:0px;line-height:130%;padding-left:6px;padding-right:6px;white-space:pre;padding-top:0px;">}</div> <div style="padding-bottom:0px;line-height:130%;padding-left:6px;padding-right:6px;white-space:pre;padding-top:0px;"> </div> <div style="padding-bottom:0px;line-height:130%;padding-left:6px;padding-right:6px;white-space:pre;padding-top:0px;"> </div></div> <div style="text-align:right;font-style:italic;margin-top:-13px;font-size:9px;margin-right:5px;"><a style="color:#e5e5e5;text-decoration:none;" href="http://colorscripter.com/info#e" target="_blank">Colored by Color Scripter</a></div></td> <td style="padding-bottom:4px;padding-left:0px;padding-right:2px;vertical-align:bottom;padding-top:0px;"><a style="color:#FFFFFF;text-decoration:none;" href="http://colorscripter.com/info#e" target="_blank"><span style="padding-bottom:1px;background-color:#e5e5e5;padding-left:1px;padding-right:1px;color:#FFFFFF;font-size:9px;padding-top:1px;">cs</span></a></td></tr></tbody></table></div> <div>제가원하는건 3개 입력받으면 3개의 피타고라스조합출력인데</div> <div>돌려보면 잘나오나 10, 20, 31개이상의 수들을 입력해보면 800몇까지 출력이되는데 이게 뭐때문에 저수들에만 저렇게반응하는건지좀 알려주세요</div>
댓글 분란 또는 분쟁 때문에 전체 댓글이 블라인드 처리되었습니다.