{"id":7165,"date":"2016-07-03T12:05:04","date_gmt":"2016-07-03T03:05:04","guid":{"rendered":"http:\/\/www.webcyou.com\/?p=7165"},"modified":"2016-08-14T14:05:52","modified_gmt":"2016-08-14T05:05:52","slug":"c%e8%a8%80%e8%aa%9e-%e7%b9%b0%e3%82%8a%e8%bf%94%e3%81%97%e6%96%87","status":"publish","type":"post","link":"https:\/\/www.webcyou.com\/?p=7165","title":{"rendered":"C\u8a00\u8a9e \u7e70\u308a\u8fd4\u3057\u6587"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/c-lan.png\" alt=\"c-lan\" width=\"551\" height=\"181\" class=\"alignnone wp-image-7269\" srcset=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/c-lan.png 600w, https:\/\/www.webcyou.com\/wp-content\/uploads\/c-lan-300x99.png 300w\" sizes=\"auto, (max-width: 551px) 100vw, 551px\" \/><\/p>\n<p>\u4eca\u56de\u3082C\u8a00\u8a9e\u306e\u7e70\u308a\u8fd4\u3057\u6587\u306b\u3064\u3044\u3066\u3001\u3064\u3089\u3064\u3089\u3068\u3002<\/p>\n<h4>for\u6587 (for statement)<\/h4>\n<p><strong>for\u6587 \u69cb\u6587<\/strong><\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">for(\u521d\u671f\u5316\u306e\u5f0f1; \u7e70\u308a\u8fd4\u3059\u304b\u3069\u3046\u304b\u306e\u5f0f2; \u5909\u5316\u306e\u305f\u3081\u306e\u5f0f3;) {\r\n  \u65871;\r\n  \u65872;\r\n  ...\r\n}<\/pre>\n<p><strong>\u4f8b\u6587\uff1a<\/strong><\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">#include &lt;stdio.h&gt;\r\nint main(void)\r\n{\r\n  int i;\r\n  \r\n  for(i = 1; i &lt;= 5; i++) {\r\n    printf(&quot;%d\u756a\u76ee\u7e70\u308a\u8fd4\u3057\u4e2d\u3002\u00a5n&quot;, i);\r\n  }\r\n  printf(&quot;\u7e70\u308a\u8fd4\u3057\u7d42\u4e86\u3002\u00a5n&quot;);\r\n\r\n  return 0;\r\n}<\/pre>\n<p><strong>\u7d50\u679c<\/strong><br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/eaea5e18d8cff2e4e2ab067e80833f8b.png\" alt=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8 2016-08-14 12.30.41\" width=\"133\" height=\"87\" class=\"alignnone size-full wp-image-7374\" \/><\/p>\n<h5>\u5165\u529b\u3057\u305f\u6570\u3060\u3051\u7e70\u308a\u8fd4\u3059<\/h5>\n<p><strong>\u4f8b\u6587\uff1a<\/strong><\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">#include &lt;stdio.h&gt;\r\nint main(void)\r\n{\r\n  int num;\r\n  int i;\r\n\r\n  printf(&quot;\u3044\u304f\u3064*\u3092\u51fa\u529b\u3057\u307e\u3059\u304b\uff1f\u00a5n&quot;);\r\n  scanf(&quot;%d&quot;, &amp;num);\r\n\r\n  for(i = 1; i &lt;= num; i++) {\r\n    printf(&quot;*&quot;);\r\n  }\r\n  printf(&quot;\u00a5n&quot;);\r\n\r\n  return 0;\r\n}<\/pre>\n<p><strong>\u7d50\u679c<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/0e21349d6e87596808bbde7d74bac349.png\" alt=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8 2016-08-14 12.32.52\" width=\"173\" height=\"45\" class=\"alignnone size-full wp-image-7375\" \/><\/p>\n<h5>\u5165\u529b\u3057\u305f\u6570\u307e\u3067\u5408\u8a08\u3059\u308b<\/h5>\n<p><strong>\u4f8b\u6587\uff1a<\/strong><\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">#include &lt;stdio.h&gt;\r\n\r\nint main(void)\r\n{\r\n  int num, sum;\r\n  int i;\r\n\r\n  num = 0;\r\n  sum = 0;\r\n  \r\n  printf(&quot;\u3044\u304f\u3064\u307e\u3067\u5408\u8a08\u3092\u6c42\u3081\u307e\u3059\u304b\uff1f\u00a5n&quot;);\r\n\r\n  scanf(&quot;%d&quot;, &amp;num);\r\n\r\n  for(i = 1; i &lt;= num; i++) {\r\n    sum += 1;\r\n  }\r\n  printf(&quot;1\u304b\u3089%d\u307e\u3067\u306e\u5408\u8a08\u5024\u306f%d\u3067\u3059\u3002\u00a5n&quot;,\u00a0num, sum);\r\n\r\n  return 0;\r\n}<\/pre>\n<p><strong>\u7d50\u679c<\/strong><br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/33a371fc0778a71d3d3a135d51b655b4.png\" alt=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8 2016-08-14 12.37.48\" width=\"203\" height=\"47\" class=\"alignnone size-full wp-image-7376\" \/><\/p>\n<h4>while\u6587(while statement)<\/h4>\n<p><strong>while\u6587 \u69cb\u6587<\/strong><\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">while(\u6761\u4ef6) {\r\n  \u6587;\r\n  ...\r\n}<\/pre>\n<p><strong>\u4f8b\u6587\uff1a<\/strong><\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">#include &lt;stdio.h&gt;\r\n\r\nint main(void)\r\n{\r\n  int i = 0;\r\n\r\n  while(i &lt;= 5) {\r\n    printf(&quot;%d\u756a\u76ee\u7e70\u308a\u8fd4\u3057\u4e2d\u3002\u00a5n&quot;, i);\r\n    i++;\r\n  }\r\n  printf(&quot;\u7e70\u308a\u8fd4\u3057\u7d42\u4e86\u3002\u00a5n&quot;);\r\n\r\n  return 0;\r\n}<\/pre>\n<p><strong>\u7d50\u679c<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/8e237ecde71ece238f63fd716430c12f.png\" alt=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8 2016-08-14 13.40.07\" width=\"132\" height=\"100\" class=\"alignnone size-full wp-image-7379\" \/><\/p>\n<p><strong>\u6163\u7528\u7684\u306a\u6761\u4ef6\u3067\u4f7f\u7528<\/strong><\/p>\n<p><strong>0\u304c\u5165\u529b\u3055\u308c\u305f\u6642\u70b9\u3067\u7d42\u4e86\u3059\u308b\u4f8b\uff1a<\/strong><\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">#include &lt;stdio.h&gt;\r\n\r\nint main(void)\r\n{\r\n  int num = 1;\r\n\r\n  while(num) {\r\n    printf(&quot;\u6574\u6570\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002\uff080\u3067\u7d42\u4e86\uff09\u00a5n&quot;);\r\n    scanf(&quot;%d&quot;, &amp;num);\r\n\r\n    printf(&quot;%d\u304c\u5165\u529b\u3055\u308c\u307e\u3057\u305f\u3002\u00a5n&quot;, num);\r\n  }\r\n  printf(&quot;\u7e70\u308a\u8fd4\u3057\u7d42\u4e86\u3002\u00a5n&quot;);\r\n\r\n  return 0;\r\n}<\/pre>\n<p><strong>\u7d50\u679c<\/strong><br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/383a353c8e01c151e42a184417350528.png\" alt=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8 2016-08-14 13.42.46\" width=\"256\" height=\"183\" class=\"alignnone size-full wp-image-7380\" \/><\/p>\n<h4>do~while\u6587 (do-while statement)<\/h4>\n<p><strong>do~while\u6587 \u69cb\u6587<\/strong><\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">do {\r\n  \u65871\r\n  ... (\u30d6\u30ed\u30c3\u30af\u5185\u306e\u51e6\u7406\u3092\u9806\u306b\u7e70\u308a\u8fd4\u3057)\r\n} while(\u6761\u4ef6); \uff08\u6761\u4ef6\u304c\u771f\u3067\u3042\u308c\u3070\u7e70\u308a\u8fd4\u3057\u3092\u7d99\u7d9a\uff09<\/pre>\n<p><strong>\u4f8b\u6587\uff1a<\/strong><\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">#include &lt;stdio.h&gt;\r\n\r\nint main(void)\r\n{\r\n  int i = 1;\r\n\r\n  do\u00a0{\r\n    printf(&quot;%d\u756a\u76ee\u7e70\u308a\u8fd4\u3057\u4e2d\u3002\u00a5n&quot;, i);\r\n    i++;\r\n  } while(i &lt;= 5);\r\n\r\n  printf(&quot;\u7e70\u308a\u8fd4\u3057\u7d42\u4e86\u3002\u00a5n&quot;);\r\n\r\n  return 0;\r\n}<\/pre>\n<p><strong>\u7d50\u679c<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/a7d9db7eccb4a0ef587c638b21dea955.png\" alt=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8 2016-08-14 13.52.09\" width=\"129\" height=\"89\" class=\"alignnone size-full wp-image-7382\" \/><\/p>\n<h4>break\u6587 (break statement)<\/h4>\n<p><strong>break\u6587 \u69cb\u6587<\/strong><\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">break;<\/pre>\n<p>break\u6587\u306f\u300c<strong>\u51e6\u7406\u306e\u6d41\u308c\u3092\u5f37\u5236\u7684\u306b\u7d42\u4e86\u3057\u3001\u305d\u306e\u30d6\u30ed\u30c3\u30af\u304b\u3089\u629c\u3051\u308b<\/strong>\u300d\u51e6\u7406\u3092\u884c\u3046\u6587\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><strong>\u4f8b\u6587\uff1a<\/strong><\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">#include &lt;stdio.h&gt;\r\n\r\nint main(void)\r\n{\r\n  int res;\r\n  int i;\r\n\r\n  printf(&quot;\u4f55\u756a\u76ee\u3067\u30eb\u30fc\u30d7\u3092\u7d42\u4e86\u3057\u307e\u3059\u304b\uff1f\uff081~10\uff09\u00a5n&quot;);\r\n  scanf(&quot;%d&quot;, &amp;res);\r\n\r\n  for(i = 1; i &lt;= 10; i++) {\r\n    printf(&quot;%d\u756a\u76ee\u7e70\u308a\u8fd4\u3057\u4e2d\u3002\u00a5n&quot;, i);\r\n    if(i == res)\r\n      break;\r\n  }\r\n  printf(&quot;\u7e70\u308a\u8fd4\u3057\u7d42\u4e86\u3002\u00a5n&quot;);\r\n\r\n  return 0;\r\n}<\/pre>\n<p><strong>\u7d50\u679c<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/baf9f567e02934ba66056709f7fb8868.png\" alt=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8 2016-08-14 13.53.37\" width=\"274\" height=\"101\" class=\"alignnone size-full wp-image-7383\" \/><\/p>\n<h4>continue\u6587\u00a0(continue\u00a0statement)<\/h4>\n<p><strong>continue\u6587 \u69cb\u6587<\/strong><\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">continue;<\/pre>\n<p>continue\u6587\u306f\u300c<strong>\u7e70\u308a\u8fd4\u3057\u6587\u5185\u306e\u51e6\u7406\u3092\u98db\u3070\u3057\u3001\u30d6\u30ed\u30c3\u30af\u306e\u5148\u982d\u4f4d\u7f6e\u306b\u623b\u3063\u3066\u6b21\u306e\u51e6\u7406\u3092\u7d9a\u3051\u308b<\/strong>\u300d\u51e6\u7406\u3092\u884c\u3046\u6587\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><strong>\u4f8b\u6587\uff1a<\/strong><\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">#include &lt;stdio.h&gt;\r\n\r\nint main(void)\r\n{\r\n  int res;\r\n  int i;\r\n\r\n  printf(&quot;\u4f55\u756a\u76ee\u306e\u51e6\u7406\u3092\u98db\u3070\u3057\u307e\u3059\u304b\uff1f\uff081~10\uff09\u00a5n&quot;);\r\n  scanf(&quot;%d&quot;, &amp;res);\r\n\r\n  for(i = 1; i &lt;= 10; i++) {\r\n    if(i == res)\r\n      continue;\r\n    \r\n    printf(&quot;%d\u756a\u76ee\u7e70\u308a\u8fd4\u3057\u4e2d\u3002\u00a5n&quot;, i);\r\n  }\r\n  \r\n  printf(&quot;\u7e70\u308a\u8fd4\u3057\u7d42\u4e86\u3002\u00a5n&quot;);\r\n\r\n  return 0;\r\n}<\/pre>\n<p><strong>\u7d50\u679c<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/1add5b8b52b503b10638753f5505ca0f.png\" alt=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8 2016-08-14 13.54.47\" width=\"255\" height=\"170\" class=\"alignnone size-full wp-image-7384\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4eca\u56de\u3082C\u8a00\u8a9e\u306e\u7e70\u308a\u8fd4\u3057\u6587\u306b\u3064\u3044\u3066\u3001\u3064\u3089\u3064\u3089\u3068\u3002 for\u6587 (for statement) for\u6587 \u69cb\u6587 for(\u521d\u671f\u5316\u306e\u5f0f1; \u7e70\u308a\u8fd4\u3059\u304b\u3069\u3046\u304b\u306e\u5f0f2; \u5909\u5316\u306e\u305f\u3081\u306e\u5f0f3;) { \u65871; \u65872; &#8230; } \u4f8b\u6587\uff1a # [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[200],"tags":[73,172,171,59,40,166,37,169,180,58,150,178,138,78,114,118],"class_list":["post-7165","post","type-post","status-publish","format-standard","hentry","category-c-2","tag-actiinscript2-0","tag-actionscript","tag-android","tag-android-sdk","tag-ios-sdk","tag-iphone","tag-iphone-","tag-mac","tag-mysql","tag-sdk","tag-vagrant","tag-178","tag-138","tag-78","tag-114","tag-118"],"_links":{"self":[{"href":"https:\/\/www.webcyou.com\/index.php?rest_route=\/wp\/v2\/posts\/7165","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webcyou.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webcyou.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webcyou.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webcyou.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7165"}],"version-history":[{"count":8,"href":"https:\/\/www.webcyou.com\/index.php?rest_route=\/wp\/v2\/posts\/7165\/revisions"}],"predecessor-version":[{"id":7385,"href":"https:\/\/www.webcyou.com\/index.php?rest_route=\/wp\/v2\/posts\/7165\/revisions\/7385"}],"wp:attachment":[{"href":"https:\/\/www.webcyou.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7165"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webcyou.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=7165"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webcyou.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=7165"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}