{"id":88,"date":"2026-03-14T17:13:06","date_gmt":"2026-03-14T09:13:06","guid":{"rendered":"https:\/\/www.caldm.cn\/?p=88"},"modified":"2026-03-14T17:13:06","modified_gmt":"2026-03-14T09:13:06","slug":"c5-%e5%be%aa%e7%8e%af","status":"publish","type":"post","link":"https:\/\/www.caldm.cn\/index.php\/2026\/03\/14\/c5-%e5%be%aa%e7%8e%af\/","title":{"rendered":"C5 \u5faa\u73af"},"content":{"rendered":"\n<pre class=\"wp-block-code\"><code>title:\nid: 20260314144223\ncreated: 2026-03-14\nblog_tags:\naliases:\n\u5206\u7c7b\u76ee\u5f55:\n\u53d1\u5e03\u5e73\u53f0: blog\n\u53d1\u5e03\u65e5\u671f:\ncover:<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">1. <code>while<\/code>\u5faa\u73af\uff1a\u5165\u53e3\u6761\u4ef6\u5faa\u73af\u7684\u57fa\u7840<\/h2>\n\n\n\n<p><code>while<\/code>\u5faa\u73af\u662f\u4f7f\u7528\u5165\u53e3\u6761\u4ef6\u7684\u6709\u6761\u4ef6\u5faa\u73af\u3002\u201c\u6709\u6761\u4ef6\u201d\u6307\u8bed\u53e5\u90e8\u5206\u7684\u6267\u884c\u53d6\u51b3\u4e8e\u6d4b\u8bd5\u8868\u8fbe\u5f0f\u63cf\u8ff0\u7684\u6761\u4ef6\u3002<\/p>\n\n\n\n<p><strong>\u8bed\u6cd5\u7ed3\u6784\uff1a<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>while (expression)\n    statement\n<\/code><\/pre>\n\n\n\n<p>\u26a0\ufe0f<strong>\u6ce8\u610f<\/strong>\uff1a\u7d27\u8ddf\u5728<code>while<\/code>\u540e\u9762\u7684<code>statement<\/code>\u624d\u662f\u5faa\u73af\u4f53\uff0c\u5b83\u53ef\u4ee5\u662f\u7b80\u5355\u8bed\u53e5\uff0c\u4e5f\u53ef\u4ee5\u662f\u590d\u5408\u8bed\u53e5\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">2. \u6784\u5efa\u5faa\u73af\u6761\u4ef6\uff1a\u5173\u7cfb\u8fd0\u7b97\u7b26\u4e0e\u771f\u503c<\/h2>\n\n\n\n<p>\u4e3a\u4e86\u6784\u5efa\u6709\u6548\u7684\u5faa\u73af\u6d4b\u8bd5\u6761\u4ef6\uff0c\u6211\u4eec\u9700\u8981\u7406\u89e3\u5173\u7cfb\u8fd0\u7b97\u7b26\u548cC\u8bed\u8a00\u4e2d\u7684\u771f\u503c\u6982\u5ff5\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u5173\u7cfb\u8fd0\u7b97\u7b26<\/h3>\n\n\n\n<p>\u5faa\u73af\u6761\u4ef6\u901a\u5e38\u9700\u8981\u4f7f\u7528\u5173\u7cfb\u8fd0\u7b97\u7b26\u6765\u6bd4\u8f83\u6570\u503c\u3002\u4ee5\u4e0b\u662fC\u8bed\u8a00\u4e2d\u7684\u5173\u7cfb\u8fd0\u7b97\u7b26\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u8fd0\u7b97\u7b26<\/th><th>\u610f\u4e49<\/th><\/tr><\/thead><tbody><tr><td><code>&lt;<\/code><\/td><td>\u5c0f\u4e8e<\/td><\/tr><tr><td><code>&lt;=<\/code><\/td><td>\u5c0f\u4e8e\u6216\u7b49\u4e8e<\/td><\/tr><tr><td>==<\/td><td>\u7b49\u4e8e<\/td><\/tr><tr><td><code>&gt;=<\/code><\/td><td>\u5927\u4e8e\u6216\u7b49\u4e8e<\/td><\/tr><tr><td><code>&gt;<\/code><\/td><td>\u5927\u4e8e<\/td><\/tr><tr><td><code>!=<\/code><\/td><td>\u4e0d\u7b49\u4e8e<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u26a0\ufe0f<strong>\u6ce8\u610f<\/strong>\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u4f18\u5148\u7ea7<\/strong>\uff1a\u5173\u7cfb\u8fd0\u7b97\u7b26\u7684\u4f18\u5148\u7ea7\u9ad8\u4e8e<a href=\"https:\/\/www.caldm.cn\/index.php\/2026\/03\/13\/c4-%e8%bf%90%e7%ae%97%e7%ac%a6%e3%80%81%e8%a1%a8%e8%be%be%e5%bc%8f%e5%92%8c%e8%af%ad%e5%8f%a5\/\" data-type=\"post\" data-id=\"57\">\u7b97\u672f\u8fd0\u7b97\u7b26<\/a>\u3002<br>\u5728\u5173\u7cfb\u8fd0\u7b97\u7b26\u5185\u90e8\uff0c<code>&lt;<\/code>\u3001<code>&lt;=<\/code>\u3001<code>><\/code>\u3001<code>>=<\/code>\u7684\u4f18\u5148\u7ea7\u9ad8\u4e8e==\u548c<code>!=<\/code>\u3002\u6240\u6709\u5173\u7cfb\u8fd0\u7b97\u7b26\u7684\u7ed3\u5408\u6027\u4e3a<strong>\u4ece\u5de6\u5230\u53f3<\/strong>\u3002<\/li>\n\n\n\n<li><strong>\u6d6e\u70b9\u6570\u6bd4\u8f83<\/strong>\uff1a\u901a\u5e38\u4f7f\u7528<code>&lt;<\/code>\u548c<code>><\/code>\u3002<br>\u5e94\u907f\u514d\u4f7f\u7528==\u548c<code>!=<\/code>\u76f4\u63a5\u6bd4\u8f83\u6d6e\u70b9\u6570\uff0c\u56e0\u4e3a\u6d6e\u70b9\u6570\u7684\u820d\u5165\u8bef\u5dee\u53ef\u80fd\u5bfc\u81f4\u903b\u8f91\u4e0a\u76f8\u7b49\u7684\u4e24\u6570\u4e0d\u76f8\u7b49\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">2.2 \u771f\u503c\u4e0e<code>_Bool<\/code>\u7c7b\u578b<\/h3>\n\n\n\n<p>C\u8bed\u8a00\u5bf9\u6240\u6709\u8868\u8fbe\u5f0f\u7684\u771f\u5047\u5224\u65ad\u9075\u5faa\u4e00\u4e2a\u7b80\u5355\u89c4\u5219\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u5047\u503c<\/strong>\uff1a\u4ec5\u4e3a<code>0<\/code>\u3002<\/li>\n\n\n\n<li><strong>\u771f\u503c<\/strong>\uff1a\u6240\u6709<strong>\u975e\u96f6<\/strong>\u503c\u3002<\/li>\n<\/ul>\n\n\n\n<p>\u4f20\u7edf\u4e0a\uff0cC\u8bed\u8a00\u7528<code>int<\/code>\u578b\u53d8\u91cf\u8868\u793a\u5e03\u5c14\u503c\uff08\u771f\/\u5047\uff09\u3002C99\u6807\u51c6\u5f15\u5165\u4e86<code>_Bool<\/code>\u7c7b\u578b\u6765\u660e\u786e\u8868\u793a\u5e03\u5c14\u53d8\u91cf\u3002<code>_Bool<\/code>\u7c7b\u578b\u7684\u53d8\u91cf\u53ea\u80fd\u5b58\u50a8<code>1<\/code>\uff08\u771f\uff09\u6216<code>0<\/code>\uff08\u5047\uff09\u3002\u5982\u679c\u5c06\u4e00\u4e2a\u975e\u96f6\u503c\u8d4b\u7ed9<code>_Bool<\/code>\u53d8\u91cf\uff0c\u5b83\u4f1a\u88ab\u81ea\u52a8\u8f6c\u6362\u4e3a<code>1<\/code>\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">3. \u4ece<code>while<\/code>\u5230<code>for<\/code>\uff1a\u4e24\u79cd\u5faa\u73af\u6a21\u5f0f<\/h2>\n\n\n\n<p>\u6839\u636e\u5faa\u73af\u6b21\u6570\u662f\u5426\u660e\u786e\uff0c\u5faa\u73af\u53ef\u5206\u4e3a\u4e24\u7c7b\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u4e0d\u786e\u5b9a\u5faa\u73af<\/strong>\uff08<em>indefinitializee loop<\/em>\uff09\uff1a\u5728\u6d4b\u8bd5\u8868\u8fbe\u5f0f\u4e3a\u5047\u4e4b\u524d\uff0c\u65e0\u6cd5\u9884\u77e5\u5faa\u73af\u6267\u884c\u6b21\u6570\u3002<\/li>\n\n\n\n<li><strong>\u8ba1\u6570\u5faa\u73af<\/strong>\uff08<em>counting loop<\/em>\uff09\uff1a\u5728\u5faa\u73af\u5f00\u59cb\u524d\uff0c\u5c31\u5df2\u660e\u786e\u77e5\u9053\u9700\u8981\u6267\u884c\u7684\u6b21\u6570\u3002<\/li>\n<\/ul>\n\n\n\n<p>\u4f7f\u7528<code>while<\/code>\u5faa\u73af\u5b9e\u73b0\u8ba1\u6570\u5faa\u73af\u901a\u5e38\u9700\u8981\u4e09\u4e2a\u660e\u786e\u7684\u6b65\u9aa4\uff1a1) \u521d\u59cb\u5316\u8ba1\u6570\u5668\uff1b2) \u6bd4\u8f83\u8ba1\u6570\u5668\uff1b3) \u66f4\u65b0\u8ba1\u6570\u5668\u3002<\/p>\n\n\n\n<p><strong><code>for<\/code>\u5faa\u73af<\/strong>\u7684\u5f15\u5165\uff0c\u6b63\u662f\u4e3a\u4e86\u5c06\u8ba1\u6570\u5faa\u73af\u7684\u4e09\u4e2a\u6b65\u9aa4\uff08\u521d\u59cb\u5316\u3001\u6d4b\u8bd5\u3001\u66f4\u65b0\uff09\u4f18\u96c5\u5730\u6574\u5408\u5728\u4e00\u8d77\uff0c\u4f7f\u4ee3\u7801\u66f4\u7d27\u51d1\u3001\u610f\u56fe\u66f4\u6e05\u6670\u3002<\/p>\n\n\n\n<p><strong><code>for<\/code>\u5faa\u73af\u8bed\u6cd5\uff1a<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>for (initialize; expression; update)\n    statement\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">4. <code>for<\/code>\u5faa\u73af\u7684\u7075\u6d3b\u6027\u8fdb\u9636<\/h2>\n\n\n\n<p><code>for<\/code>\u5faa\u73af\u7684\u8bed\u6cd5\u8bbe\u8ba1\u8d4b\u4e88\u4e86\u5b83\u6781\u5927\u7684\u7075\u6d3b\u6027\uff0c\u8fdc\u4e0d\u6b62\u7b80\u5355\u7684\u8ba1\u6570\u3002\u5faa\u73af\u5934\u4e2d\u7684\u4e09\u4e2a\u8868\u8fbe\u5f0f\u53ef\u4ee5\u6709\u591a\u79cd\u53d8\u5316\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">4.1 \u591a\u6837\u7684\u66f4\u65b0\u4e0e\u63a7\u5236\u65b9\u5f0f<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u53cd\u5411\u8ba1\u6570<\/strong>\uff1a\u4f7f\u7528\u9012\u51cf\u8fd0\u7b97\u7b26\uff08\u5982<code>i--<\/code>\uff09\u66f4\u65b0\u8ba1\u6570\u5668\u3002<\/li>\n\n\n\n<li><strong>\u6b65\u957f\u63a7\u5236<\/strong>\uff1a\u8ba9\u8ba1\u6570\u5668\u4e00\u6b21\u589e\u52a02\u300110\u6216\u5176\u4ed6\u6570\u503c\u3002<\/li>\n\n\n\n<li><strong>\u5b57\u7b26\u8ba1\u6570<\/strong>\uff1a\u7528\u5b57\u7b26\u53d8\u91cf\u4f5c\u4e3a\u8ba1\u6570\u5668\uff08\u5982<code>ch = 'a'; ch &lt;= 'z'; ch++<\/code>\uff09\u3002<\/li>\n\n\n\n<li><strong>\u590d\u5408\u6761\u4ef6<\/strong>\uff1a\u6d4b\u8bd5\u8868\u8fbe\u5f0f\u4e0d\u9650\u4e8e\u8fed\u4ee3\u6b21\u6570\uff0c\u53ef\u5305\u542b\u5176\u4ed6\u4efb\u610f\u6761\u4ef6\u3002<\/li>\n\n\n\n<li><strong>\u51e0\u4f55\u589e\u957f<\/strong>\uff1a\u66f4\u65b0\u8868\u8fbe\u5f0f\u53ef\u4f7f\u8ba1\u6570\u5668\u4ee5\u500d\u6570\u589e\u957f\uff08\u5982<code>i *= 2<\/code>\uff09\u3002<\/li>\n\n\n\n<li><strong>\u4efb\u610f\u5408\u6cd5\u8868\u8fbe\u5f0f<\/strong>\uff1a\u7b2c\u4e09\u4e2a\u8868\u8fbe\u5f0f\uff08<code>update<\/code>\uff09\u53ef\u4ee5\u662f\u4efb\u4f55\u5408\u6cd5\u7684C\u8bed\u8a00\u8868\u8fbe\u5f0f\u3002<\/li>\n\n\n\n<li><strong>\u8868\u8fbe\u5f0f\u7701\u7565<\/strong>\uff1a\u53ef\u4ee5\u7701\u7565\u4e00\u4e2a\u6216\u591a\u4e2a\u8868\u8fbe\u5f0f\uff0c\u4f46\u5fc5\u987b\u4fdd\u7559\u5206\u53f7\u3002<strong>\u5982\u679c\u7701\u7565\u7b2c\u4e8c\u4e2a\u8868\u8fbe\u5f0f\uff08<code>expression<\/code>\uff09\uff0c\u5b83\u4f1a\u88ab\u89c6\u4e3a\u6c38\u8fdc\u4e3a\u771f<\/strong>\uff0c\u56e0\u6b64\u5fc5\u987b\u5728\u5faa\u73af\u4f53\u5185\u63d0\u4f9b\u7ec8\u6b62\u5faa\u73af\u7684\u673a\u5236\uff08\u5982<code>break<\/code>\uff09\u3002<\/li>\n\n\n\n<li><strong>\u521d\u59cb\u5316\u4e2d\u7684\u64cd\u4f5c<\/strong>\uff1a\u7b2c\u4e00\u4e2a\u8868\u8fbe\u5f0f\u4e0d\u4e00\u5b9a\u662f\u8d4b\u503c\uff0c\u4e5f\u53ef\u4ee5\u662f\u51fd\u6570\u8c03\u7528\uff08\u5982<code>printf(...)<\/code>\uff09\u3002<\/li>\n\n\n\n<li><strong>\u5faa\u73af\u4f53\u5f71\u54cd\u5faa\u73af\u5934<\/strong>\uff1a\u5faa\u73af\u4f53\u5185\u7684\u8bed\u53e5\u53ef\u4ee5\u6539\u53d8\u5faa\u73af\u5934\u4e2d\u8868\u8fbe\u5f0f\u7684\u53d8\u91cf\u503c\u3002<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">4.2 \u6269\u5c55\u5229\u5668\uff1a\u9017\u53f7\u8fd0\u7b97\u7b26<\/h3>\n\n\n\n<p>\u4e3a\u4e86\u5728<code>for<\/code>\u5faa\u73af\u5934\u4e2d\u6267\u884c\u591a\u4e2a\u521d\u59cb\u5316\u6216\u66f4\u65b0\u64cd\u4f5c\uff0cC\u8bed\u8a00\u63d0\u4f9b\u4e86<strong>\u9017\u53f7\u8fd0\u7b97\u7b26<\/strong>\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>for (initialize_A, initialize_B; expression; update_A, update_B)\n    statement\n<\/code><\/pre>\n\n\n\n<p><strong>\u9017\u53f7\u8fd0\u7b97\u7b26\u7279\u6027<\/strong>\uff1a<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u987a\u5e8f\u6c42\u503c<\/strong>\uff1a\u4fdd\u8bc1\u88ab\u5b83\u5206\u9694\u7684\u8868\u8fbe\u5f0f\u4ece\u5de6\u5230\u53f3\u4f9d\u6b21\u6267\u884c\u3002<\/li>\n\n\n\n<li><strong>\u6574\u4f53\u503c<\/strong>\uff1a\u6574\u4e2a\u9017\u53f7\u8868\u8fbe\u5f0f\u7684\u503c\u662f<strong>\u6700\u53f3\u8fb9\u8868\u8fbe\u5f0f<\/strong>\u7684\u503c\u3002<\/li>\n<\/ol>\n\n\n\n<p>\u9017\u53f7\u8fd0\u7b97\u7b26\u4e5f\u53ef\u7528\u4e8e<code>for<\/code>\u5faa\u73af\u4e4b\u5916\u7684\u573a\u5408\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">5. \u7b80\u6d01\u7684\u8d4b\u503c\uff1a\u590d\u5408\u8d4b\u503c\u8fd0\u7b97\u7b26<\/h2>\n\n\n\n<p>\u4e3a\u4e86\u8ba9\u53d8\u91cf\u81ea\u8eab\u7684\u8fd0\u7b97\u8d4b\u503c\u66f4\u7b80\u6d01\uff0cC\u8bed\u8a00\u63d0\u4f9b\u4e86\u4e00\u7cfb\u5217<strong>\u590d\u5408\u8d4b\u503c\u8fd0\u7b97\u7b26<\/strong>\u3002<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u8fd0\u7b97\u7b26<\/th><th>\u793a\u4f8b<\/th><th>\u7b49\u4ef7\u4e8e<\/th><\/tr><\/thead><tbody><tr><td><code>+=<\/code><\/td><td><code>num += 20;<\/code><\/td><td><code>num = num + 20;<\/code><\/td><\/tr><tr><td><code>-=<\/code><\/td><td><code>eggs -= 10;<\/code><\/td><td><code>eggs = eggs - 10;<\/code><\/td><\/tr><tr><td><code>*=<\/code><\/td><td><code>add *= 3;<\/code><\/td><td><code>add = add * 3;<\/code><\/td><\/tr><tr><td><code>\/=<\/code><\/td><td><code>time \/= 2;<\/code><\/td><td><code>time = time \/ 2;<\/code><\/td><\/tr><tr><td><code>%=<\/code><\/td><td><code>red %= 3;<\/code><\/td><td><code>red = red % 3;<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u7528\u6cd5\uff1a<code>\u53d8\u91cf \u8fd0\u7b97\u7b26 \u8868\u8fbe\u5f0f<\/code>\u3002\u5b83\u4eec\u5728\u5faa\u73af\u7684\u66f4\u65b0\u90e8\u5206\u5c24\u4e3a\u5e38\u7528\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">6. \u51fa\u53e3\u6761\u4ef6\u5faa\u73af\uff1a<code>do while<\/code><\/h2>\n\n\n\n<p>\u4e0e<code>while<\/code>\u548c<code>for<\/code>\u8fd9\u7c7b<strong>\u5165\u53e3\u6761\u4ef6\u5faa\u73af<\/strong>\uff08\u5148\u68c0\u67e5\u6761\u4ef6\uff0c\u518d\u51b3\u5b9a\u662f\u5426\u6267\u884c\u5faa\u73af\u4f53\uff09\u4e0d\u540c\uff0cC\u8bed\u8a00\u8fd8\u63d0\u4f9b\u4e86<strong>\u51fa\u53e3\u6761\u4ef6\u5faa\u73af<\/strong>\u2014\u2014<code>do while<\/code>\u3002<\/p>\n\n\n\n<p><strong>\u8bed\u6cd5\u7ed3\u6784\uff1a<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>do\n    statement\nwhile (expression);\n<\/code><\/pre>\n\n\n\n<p><code>do while<\/code>\u5faa\u73af<strong>\u5148\u6267\u884c\u4e00\u6b21\u5faa\u73af\u4f53<\/strong>\uff0c\u7136\u540e\u518d\u68c0\u67e5\u6d4b\u8bd5\u6761\u4ef6\u3002\u56e0\u6b64\uff0c\u5b83<strong>\u81f3\u5c11\u4f1a\u6267\u884c\u5faa\u73af\u4f53\u4e00\u6b21<\/strong>\u3002\u5728\u9700\u8981\u786e\u4fdd\u67d0\u4e2a\u64cd\u4f5c\u81f3\u5c11\u6267\u884c\u4e00\u6b21\u7684\u573a\u666f\u4e0b\u975e\u5e38\u6709\u7528\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">7. \u590d\u6742\u6570\u636e\u64cd\u4f5c\uff1a\u5d4c\u5957\u5faa\u73af\u4e0e\u6570\u7ec4\u7b80\u4ecb<\/h2>\n\n\n\n<p>\u638c\u63e1\u4e86\u57fa\u672c\u5faa\u73af\u540e\uff0c\u6211\u4eec\u53ef\u4ee5\u5904\u7406\u66f4\u590d\u6742\u7684\u6570\u636e\u7ed3\u6784\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">7.1 \u5d4c\u5957\u5faa\u73af<\/h3>\n\n\n\n<p>\u5728\u4e00\u4e2a\u5faa\u73af\u5185\u90e8\u5305\u542b\u53e6\u4e00\u4e2a\u5b8c\u6574\u7684\u5faa\u73af\uff0c\u79f0\u4e3a<strong>\u5d4c\u5957\u5faa\u73af<\/strong>\u3002\u5b83\u5e38\u7528\u4e8e\u5904\u7406\u4e8c\u7ef4\u6570\u636e\uff0c\u4f8b\u5982\u6309\u884c\u548c\u5217\u8f93\u51fa\u8868\u683c\u3001\u77e9\u9635\u8fd0\u7b97\u7b49\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">7.2 \u6570\u7ec4\u7b80\u4ecb<\/h3>\n\n\n\n<p><strong>\u6570\u7ec4<\/strong>\u662f\u4e00\u79cd\u7528\u4e8e\u5b58\u50a8<strong>\u591a\u4e2a\u76f8\u540c\u7c7b\u578b<\/strong>\u6570\u636e\u7684\u6570\u636e\u7ed3\u6784\u3002\u8fd9\u4e9b\u6570\u636e\u5728\u5185\u5b58\u4e2d<strong>\u987a\u5e8f\u6392\u5217<\/strong>\uff0c\u5e76\u901a\u8fc7\u4e00\u4e2a\u6570\u7ec4\u540d\u548c\u6574\u6570<strong>\u4e0b\u6807<\/strong>\uff08\u6216\u7d22\u5f15\uff09\u6765\u8bbf\u95ee\u3002<\/p>\n\n\n\n<p>\u4f8b\u5982\uff0c<code>scores[0]<\/code>\u8bbf\u95ee\u6570\u7ec4<code>scores<\/code>\u7684\u7b2c\u4e00\u4e2a\u5143\u7d20\u3002<\/p>\n\n\n\n<p>\u2757 <strong>\u91cd\u8981\u8b66\u544a<\/strong>\uff1aC\u8bed\u8a00\u7f16\u8bd1\u5668<strong>\u4e0d\u4f1a\u68c0\u67e5\u6570\u7ec4\u4e0b\u6807\u7684\u6709\u6548\u6027<\/strong>\u3002\u8bbf\u95ee\u6570\u7ec4\u8303\u56f4\u4e4b\u5916\u7684\u5185\u5b58\uff08\u5982<code>scores[100]<\/code>\uff0c\u800c\u6570\u7ec4\u53ea\u670910\u4e2a\u5143\u7d20\uff09\u4f1a\u5bfc\u81f4\u672a\u5b9a\u4e49\u884c\u4e3a\uff0c\u53ef\u80fd\u5f15\u53d1\u7a0b\u5e8f\u5d29\u6e83\u6216\u5b89\u5168\u6f0f\u6d1e\uff0c\u7a0b\u5e8f\u5458\u5fc5\u987b\u81ea\u884c\u786e\u4fdd\u4e0b\u6807\u5408\u6cd5\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. while\u5faa\u73af\uff1a\u5165\u53e3\u6761\u4ef6\u5faa\u73af\u7684\u57fa\u7840 while\u5faa\u73af\u662f\u4f7f\u7528\u5165\u53e3\u6761\u4ef6\u7684\u6709\u6761\u4ef6\u5faa\u73af\u3002\u201c\u6709\u6761\u4ef6\u201d\u6307\u8bed\u53e5\u90e8\u5206\u7684\u6267\u884c [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[11],"class_list":["post-88","post","type-post","status-publish","format-standard","hentry","category-c-2","tag-c-2"],"_links":{"self":[{"href":"https:\/\/www.caldm.cn\/index.php\/wp-json\/wp\/v2\/posts\/88","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.caldm.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.caldm.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.caldm.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.caldm.cn\/index.php\/wp-json\/wp\/v2\/comments?post=88"}],"version-history":[{"count":1,"href":"https:\/\/www.caldm.cn\/index.php\/wp-json\/wp\/v2\/posts\/88\/revisions"}],"predecessor-version":[{"id":89,"href":"https:\/\/www.caldm.cn\/index.php\/wp-json\/wp\/v2\/posts\/88\/revisions\/89"}],"wp:attachment":[{"href":"https:\/\/www.caldm.cn\/index.php\/wp-json\/wp\/v2\/media?parent=88"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.caldm.cn\/index.php\/wp-json\/wp\/v2\/categories?post=88"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.caldm.cn\/index.php\/wp-json\/wp\/v2\/tags?post=88"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}