{"id":64127,"date":"2026-01-22T20:40:32","date_gmt":"2026-01-22T12:40:32","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/64127.html"},"modified":"2026-01-22T20:40:32","modified_gmt":"2026-01-22T12:40:32","slug":"%e3%80%90c%e3%80%91-%e5%88%b7%e9%a2%98%e4%b8%80%e6%98%9f%e6%9c%9f%e7%9a%84%e5%b0%8f%e6%80%bb%e7%bb%93%e5%8c%85%e6%8b%ac%e6%b1%82%e6%9c%80%e5%a4%a7%e5%80%bc%ef%bc%8c%e7%94%a8%e6%95%b0%e7%bb%84","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/64127.html","title":{"rendered":"\u3010C++\u3011 \u5237\u9898\u4e00\u661f\u671f\u7684\u5c0f\u603b\u7ed3(\u5305\u62ec\u6c42\u6700\u5927\u503c\uff0c\u7528\u6570\u7ec4\u50a8\u5b58\u5305\u542b\u7a7a\u683c\u7684\u5b57\u7b26\u4e32\u3001\u5411\u4e0a\u53d6\u6574)"},"content":{"rendered":"<h2 style=\"background-color:transparent\">1.\u6c42\u6700\u5927\u503c\u6216\u6700\u5c0f\u503c<\/h2>\n<p>\u5bf9\u4e00\u4e2a\u521d\u5b66\u8005\u6765\u8bf4&#xff0c;\u5728\u5237\u9898\u7684\u65f6\u5019\u9047\u5230\u8fd9\u79cd\u6c42\u89e3&#xff0c;\u6700\u5927\u503c\u548c\u6700\u5c0f\u503c\u662f\u7279\u522b\u5e38\u89c1\u7684,\u5927\u5bb6\u5728\u9047\u5230\u8fd9\u79cd\u95ee\u9898\u7684\u65f6\u5019&#xff0c;\u662f\u7528\u4ec0\u4e48\u65b9\u6cd5\u5728\u89e3\u51b3\u5462&#xff1f;\u8fd9\u91cc\u63d0\u4f9b\u4e24\u79cd\u5199\u6cd5\u4f9b\u5927\u5bb6\u53c2\u8003<\/p>\n<h3>1.1 \u5e38\u89c4\u5199\u6cd5<\/h3>\n<p>\u7b2c\u4e00\u79cd\u5199\u6cd5\u3002\u76f8\u4fe1\u5927\u5bb6\u5728\u521d\u5b66\u7f16\u7a0b\u8bed\u8a00\u7684\u65f6\u5019\u4e00\u5b9a\u90fd\u8fd9\u4e48\u5e72\u8fc7<\/p>\n<p>#include&lt;iostream&gt;<br \/>\nusing namespace std;<br \/>\nint main()<br \/>\n{<br \/>\nint a, b, c;<br \/>\ncin &gt;&gt; a &gt;&gt; b &gt;&gt; c;<br \/>\nint max &#061; a;<\/p>\n<p>if (b &gt; max)<br \/>\nmax &#061; b;<\/p>\n<p>if (c &gt; max)<br \/>\nmax &#061; c;<br \/>\nreturn 0;<br \/>\n}<\/p>\n<p>\u8fd9\u79cd\u65b9\u6cd5\u7684\u672c\u8d28\u5c31\u662f\u5148\u968f\u4fbf\u6307\u5b9a\u4e00\u4e2a\u6570\u4e3a\u6700\u5927\u503c&#xff0c;\u7136\u540e\u518d\u901a\u8fc7\u6bd4\u8f83\u548c\u8d4b\u503c\u7684\u64cd\u4f5c\u6765\u8c03\u6574\u3002<\/p>\n<p>\u8fd9\u79cd\u65b9\u6cd5\u7684\u597d\u5904\u5c31\u662f\u6781\u5176\u9002\u5408\u521d\u5b66\u8005&#xff0c;\u4f46\u662f\u8fd9\u4f1a\u8ba9\u4ee3\u7801\u663e\u5f97\u5197\u4f59&#xff0c;\u5982\u679c\u60f3\u8ba9\u4ee3\u7801\u66f4\u7b80\u6d01\u3001\u66f4 \u201cC&#043;&#043; \u98ce\u683c\u201d&#xff0c;\u8fd9\u91cc\u6709\u51e0\u4e2a\u66f4\u597d\u7684\u65b9\u6848&#xff1a;<\/p>\n<h3>1.2 \u5229\u7528\u5e93\u51fd\u6570\u5b9e\u73b0&#xff08;\u4e00\u884c\u641e\u5b9a&#xff09;<\/h3>\n<p>#include &lt;iostream&gt;<br \/>\n#include &lt;algorithm&gt;  \/\/ \u663e\u5f0f\u5305\u542b\u5934\u6587\u4ef6&#xff0c;\u786e\u4fdd std::max \u53ef\u7528<\/p>\n<p>using namespace std;<\/p>\n<p>int main()<br \/>\n{<br \/>\n    int a, b, c;<br \/>\n    cin &gt;&gt; a &gt;&gt; b &gt;&gt; c;<\/p>\n<p>    \/\/ \u65b9\u68481&#xff1a;\u5d4c\u5957\u8c03\u7528 std::max<br \/>\n    int max_val &#061; max(max(a, b), c);<\/p>\n<p>    \/\/ \u65b9\u68482&#xff1a;C&#043;&#043;11\u53ca\u4ee5\u540e\u652f\u6301\u521d\u59cb\u5316\u5217\u8868&#xff0c;\u66f4\u76f4\u89c2<br \/>\n    int max_val &#061; max({a, b, c});<\/p>\n<p>    cout &lt;&lt; &#034;\u6700\u5927\u503c\u662f&#xff1a;&#034; &lt;&lt; max_val &lt;&lt; endl;<br \/>\n    return 0;<br \/>\n}<\/p>\n<h3>1.3 \u4e09\u76ee\u8fd0\u7b97\u7b26<\/h3>\n<p>\u7528\u4e09\u76ee\u8fd0\u7b97\u7b26\u53ef\u4ee5\u628a\u6bd4\u8f83\u903b\u8f91\u538b\u7f29\u5230\u4e00\u884c&#xff0c;\u9002\u5408\u8ffd\u6c42\u7b80\u6d01\u7684\u573a\u666f&#xff1a;<\/p>\n<p>#include&lt;iostream&gt;<br \/>\nusing namespace std;<br \/>\nint main()<br \/>\n{<br \/>\nint a, b, c;<br \/>\ncin &gt;&gt; a &gt;&gt; b &gt;&gt; c;<\/p>\n<p>a &#061; a &gt; b ? a : b;  \/\/exp1 ? exp2 : exp3<br \/>\na &#061; a &gt; c ? a : c;  \/\/\u4e09\u76ee\u64cd\u4f5c\u7b26&#xff1a;\u8868\u8fbe\u5f0f exp1 \u6210\u7acb&#xff0c;\u7ed3\u679c\u5c31\u662f\u8868\u8fbe\u5f0f exp2 \u7684\u503c<br \/>\n\/\/            \u82e5\u4e0d\u6210\u7acb\u7ed3\u679c\u5c31\u662f exp3 \u7684\u503c<br \/>\ncout &lt;&lt; a &lt;&lt; endl;<br \/>\nreturn 0;<br \/>\n}<\/p>\n<h2 style=\"background-color:transparent\">2.\u00a0 \u5b8c\u6574\u8bfb\u53d6\u5e26\u7a7a\u683c\u7684\u5b57\u7b26\u4e32 &#xff08;getline)<\/h2>\n<p>\u5728\u6211\u4eec\u89e3\u9898\u7684\u65f6\u5019&#xff0c;\u6709\u7684\u65f6\u5019\u4f1a\u9047\u89c1\u9700\u8981\u6211\u4eec\u8bfb\u53d6\u4e00\u6574\u4e32\u5b57\u7b26\u4e32\u7684\u60c5\u51b5\u3002<span style=\"color:#fe2c24\">\u800c\u5982\u679c\u521b\u7acb\u4e00\u4e2a\u6570\u7ec4&#xff0c;\u7136\u540e\u7528 cin \u6216\u8005\u662f scanf \u53bb\u8bfb\u53d6\u7684\u65b9\u5f0f&#xff0c;\u90a3\u5c31\u65e0\u6cd5\u8bfb\u53d6\u5230\u5e26\u7a7a\u683c\u7684\u5b57\u7b26\u4e32&#xff0c;<\/span>\u6bd4\u5982\u8bf4 I love C \u8fd9\u53e5\u8bdd\u91cc\u9762\u5c31\u542b\u6709\u4e24\u4e2a\u7a7a\u683c&#xff0c;\u5982\u679c\u4f60\u76f4\u63a5\u7528 scanf \u53bb\u8bfb\u53d6\u7684\u8bdd&#xff0c;\u6216\u8005\u662f cin \u53bb\u8bfb\u53d6\u7684\u8bdd&#xff0c;\u4f60\u53ea\u4f1a\u8bfb\u53d6\u5230 I<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"1185\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/01\/20260122124030-69721abec3300.png\" width=\"1337\" \/><\/p>\n<p>\u5c31\u50cf\u4e0a\u9762\u8fd9\u9898&#xff0c;\u5728\u8bfb\u53d6\u5b57\u7b26\u4e32\u65f6\u5fc5\u987b\u7528\u5230 getline\u00a0\u8fd9\u4e2a\u51fd\u6570<\/p>\n<p>#include &lt;iostream&gt;<br \/>\n#include &lt;string&gt;  \/\/ \u5fc5\u987b\u5305\u542b\u6b64\u5934\u6587\u4ef6<br \/>\nusing namespace std;<\/p>\n<p>int main() {<br \/>\n    \/\/ \u65b9\u68481&#xff1a;\u8bfb\u53d6\u65e0\u7a7a\u683c\u7684\u5b57\u7b26\u4e32&#xff08;\u5982 &#034;hello&#034;&#xff09;<br \/>\n    string str1;<br \/>\n    cout &lt;&lt; &#034;\u8f93\u5165\u65e0\u7a7a\u683c\u5b57\u7b26\u4e32&#xff1a;&#034;;<br \/>\n    cin &gt;&gt; str1;  \/\/ \u9047\u5230\u7a7a\u683c\/\u6362\u884c\u5c31\u505c\u6b62\u8bfb\u53d6<br \/>\n    cout &lt;&lt; &#034;\u4f60\u8f93\u5165\u7684\u662f&#xff1a;&#034; &lt;&lt; str1 &lt;&lt; endl;<\/p>\n<p>    \/\/ \u6ce8\u610f&#xff1a;cin\u8bfb\u53d6\u540e\u4f1a\u6b8b\u7559\u6362\u884c\u7b26&#xff0c;\u9700\u8981\u6e05\u7406\u7f13\u51b2\u533a\u624d\u80fd\u7528getline<br \/>\n    cin.ignore(numeric_limits&lt;streamsize&gt;::max(), &#039;\\\\n&#039;);<\/p>\n<p>    \/\/ \u65b9\u68482&#xff1a;\u8bfb\u53d6\u5e26\u7a7a\u683c\u7684\u6574\u884c\u5b57\u7b26\u4e32&#xff08;\u5982 &#034;hello world&#034;&#xff09;<br \/>\n    string str2;<br \/>\n    cout &lt;&lt; &#034;\u8f93\u5165\u5e26\u7a7a\u683c\u7684\u6574\u884c\u5b57\u7b26\u4e32&#xff1a;&#034;;<br \/>\n    getline(cin, str2);  \/\/ \u8bfb\u53d6\u6574\u884c&#xff0c;\u5305\u62ec\u7a7a\u683c<br \/>\n    cout &lt;&lt; &#034;\u4f60\u8f93\u5165\u7684\u662f&#xff1a;&#034; &lt;&lt; str2 &lt;&lt; endl;<\/p>\n<p>    return 0;<br \/>\n}<\/p>\n<h2>3. \u5411\u4e0a\u53d6\u6574\u548c\u5411\u4e0b\u53d6\u6574<\/h2>\n<h3>3.1 \u5de7\u5999\u8fd0\u7528\u6574\u6570\u9664\u6cd5<\/h3>\n<p>\u9762\u5bf9\u53d6\u6574\u95ee\u9898&#xff0c;\u6211\u6709\u4e24\u4e2a\u89e3\u51b3\u65b9\u6848&#xff0c;\u7b2c\u4e00\u4e2a\u5c31\u662f\u901a\u8fc7\u5de7\u5999\u7684\u8fd0\u7528\u6574\u6570\u9664\u6cd5\u6765\u5b9e\u73b0\u8fd9\u4e00\u64cd\u4f5c&#xff0c;\u53e6\u5916\u4e00\u79cd\u540c\u6837\u4e5f\u662f\u4f7f\u7528\u5e93\u51fd\u6570&#xff0c;\u5148\u4ecb\u7ecd\u7b2c\u4e00\u79cd<\/p>\n<p>#include&lt;iostream&gt;<br \/>\nusing namespace std;<br \/>\nint main()<br \/>\n{<br \/>\nint distance &#061; 103;<br \/>\nint speed &#061; 3;<br \/>\nint time &#061; (distance &#043; speed &#8211; 1) \/ speed;  \/\/\u7ed3\u679c\u4e3a 35<\/p>\n<p>cout &lt;&lt; time &lt;&lt; endl;<br \/>\nreturn 0;<br \/>\n}<\/p>\n<p>\u8fd9\u79cd\u505a\u6cd5\u7684\u672c\u8d28\u5176\u5b9e\u5c31\u662f\u6211\u901a\u8fc7\u52a0\u4e00\u4e2a\u9664\u6570&#xff0c;\u4f7f\u5f97\u6211\u7684\u7ed3\u679c\u5fc5\u5b9a\u4f1a&#043;1&#xff0c;\u7136\u540e\u518d\u53bb -1\u3002\u907f\u514d\u56e0\u4e3a\u6211 distance \u672c\u8eab\u5c31\u80fd\u6574\u9664\u3002\u4f46\u6211\u4ecd\u7136\u5411\u4e0a\u53d6\u4e86\u4e00\u4f4d\u3002\u610f\u601d\u5c31\u662f\u8bf4 distance \u53ea\u8981\u6bd4\u80fd\u6574\u9664\u7684\u60c5\u51b5\u5927\u4e00\u70b9&#xff0c;\u4e5f\u5c31\u662f\u5927\u4e00\u5c31\u80fd\u5b9e\u73b0\u5411\u4e0a\u53d6\u6574\u3002<\/p>\n<h3>3.2 \u5e93\u51fd\u6570<\/h3>\n<p>#include&lt;iostream&gt;<br \/>\n#include&lt;cmath&gt;   \/\/<br \/>\nusing namespace std;<br \/>\nint main()<br \/>\n{<br \/>\nint distance &#061; 103;<br \/>\nint speed &#061; 3;<br \/>\nint time &#061; ceil(distance * 1.0 \/ speed);<br \/>\n             \/\/\u8fd9\u91cc\u8bb0\u5f97 * 1.0 &#xff0c;\u5426\u5219\u4f1a\u56e0\u4e3a\u6267\u884c\u7684\u662f\u6574\u6570\u9664\u6cd5\u800c\u8ba1\u7b97\u9519\u8bef<br \/>\ncout &lt;&lt; time &lt;&lt; endl;       \/\/\u7ed3\u679c\u4e3a 35 <\/p>\n<p>int time &#061; floor(distance * 1.0 \/ speed);<br \/>\ncout &lt;&lt; time &lt;&lt; endl;       \/\/\u7ed3\u679c\u4e3a 34<br \/>\nreturn 0;<br \/>\n}<\/p>\n<p>\u6211\u4eec\u5148\u6765\u770b\u770b\u8fd9\u4e2a\u82f1\u6587\u5355\u8bcd&#xff0c;ceil \u867d\u7136\u672c\u8eab\u662f\u4e2a\u52a8\u8bcd&#xff0c;\u4f46\u5b83\u7684\u540d\u8bcd\u7684\u610f\u601d\u662f\u5929\u82b1\u677f&#xff0c;floor \u8fd9\u4e2a\u5355\u8bcd\u7684\u610f\u601d\u662f\u5730\u677f\u3002\u5f88\u5f62\u8c61\u5427<\/p>\n<p>\u5927\u5bb6\u5e94\u7528\u8fd9\u4e24\u4e2a\u51fd\u6570\u4e00\u5b9a\u8981\u6ce8\u610f\u4e24\u4e2a\u70b9&#xff0c;<span style=\"color:#fe2c24\">\u4e00\u4e2a\u5c31\u662f\u8981\u5305\u542b cmath\u8fd9\u4e2a\u5934\u6587\u4ef6\u3002\u8fd8\u6709\u4e00\u4e2a\u5c31\u662f\u4f60\u4f20\u8fdb\u53bb\u7684\u53c2\u6570\u4e00\u5b9a\u8981\u662f\u4e00\u4e2a\u6d6e\u70b9\u6570\u3002\u5982\u679c\u4f60\u8981\u4f20\u4e00\u4e2a\u8868\u8fbe\u5f0f&#xff0c;\u5207\u8bb0\u5b83\u4eec\u6267\u884c\u7684\u4e00\u5b9a\u8981\u662f\u4e00\u4e2a\u6d6e\u70b9\u6570\u9664\u6cd5\u3002<\/span>\u50cf\u6211\u8fd9\u91cc\u5c31\u624b\u52a8\u7684\u7ed9\u5b83\u4e58\u4e86\u4e2a1.0&#xff0c;\u4f7f\u5f97\u5b83\u6267\u884c\u4e86\u6d6e\u70b9\u6570\u9664\u6cd5\u3002<\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1.\u6c42\u6700\u5927\u503c\u6216\u6700\u5c0f\u503c\u5bf9\u4e00\u4e2a\u521d\u5b66\u8005\u6765\u8bf4&#xff0c;\u5728\u5237\u9898\u7684\u65f6\u5019\u9047\u5230\u8fd9\u79cd\u6c42\u89e3&#xff0c;\u6700\u5927\u503c\u548c\u6700\u5c0f\u503c\u662f\u7279\u522b\u5e38\u89c1\u7684,\u5927\u5bb6\u5728\u9047\u5230\u8fd9\u79cd\u95ee\u9898\u7684\u65f6\u5019&#xff0c;\u662f\u7528\u4ec0\u4e48\u65b9\u6cd5\u5728\u89e3\u51b3\u5462&#xff1f;\u8fd9\u91cc\u63d0\u4f9b\u4e24\u79cd\u5199\u6cd5\u4f9b\u5927\u5bb6\u53c2\u80031.1 \u5e38\u89c4\u5199\u6cd5\u7b2c\u4e00\u79cd\u5199\u6cd5\u3002\u76f8\u4fe1\u5927\u5bb6\u5728\u521d\u5b66\u7f16\u7a0b\u8bed\u8a00\u7684\u65f6\u5019\u4e00\u5b9a\u90fd\u8fd9\u4e48\u5e72\u8fc7#include<br \/>\nusing namespace std;<br \/>\nint main()<br \/>\n{<br \/>\nint a, b, c;<br \/>\ncin &gt;&gt; a &gt;&gt; b &gt;&gt; c;<br \/>\nint max <\/p>\n","protected":false},"author":2,"featured_media":64126,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[1813,427],"topic":[],"class_list":["post-64127","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-1813","tag-427"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u3010C++\u3011 \u5237\u9898\u4e00\u661f\u671f\u7684\u5c0f\u603b\u7ed3(\u5305\u62ec\u6c42\u6700\u5927\u503c\uff0c\u7528\u6570\u7ec4\u50a8\u5b58\u5305\u542b\u7a7a\u683c\u7684\u5b57\u7b26\u4e32\u3001\u5411\u4e0a\u53d6\u6574) - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/64127.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u3010C++\u3011 \u5237\u9898\u4e00\u661f\u671f\u7684\u5c0f\u603b\u7ed3(\u5305\u62ec\u6c42\u6700\u5927\u503c\uff0c\u7528\u6570\u7ec4\u50a8\u5b58\u5305\u542b\u7a7a\u683c\u7684\u5b57\u7b26\u4e32\u3001\u5411\u4e0a\u53d6\u6574) - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"1.\u6c42\u6700\u5927\u503c\u6216\u6700\u5c0f\u503c\u5bf9\u4e00\u4e2a\u521d\u5b66\u8005\u6765\u8bf4&#xff0c;\u5728\u5237\u9898\u7684\u65f6\u5019\u9047\u5230\u8fd9\u79cd\u6c42\u89e3&#xff0c;\u6700\u5927\u503c\u548c\u6700\u5c0f\u503c\u662f\u7279\u522b\u5e38\u89c1\u7684,\u5927\u5bb6\u5728\u9047\u5230\u8fd9\u79cd\u95ee\u9898\u7684\u65f6\u5019&#xff0c;\u662f\u7528\u4ec0\u4e48\u65b9\u6cd5\u5728\u89e3\u51b3\u5462&#xff1f;\u8fd9\u91cc\u63d0\u4f9b\u4e24\u79cd\u5199\u6cd5\u4f9b\u5927\u5bb6\u53c2\u80031.1 \u5e38\u89c4\u5199\u6cd5\u7b2c\u4e00\u79cd\u5199\u6cd5\u3002\u76f8\u4fe1\u5927\u5bb6\u5728\u521d\u5b66\u7f16\u7a0b\u8bed\u8a00\u7684\u65f6\u5019\u4e00\u5b9a\u90fd\u8fd9\u4e48\u5e72\u8fc7#include using namespace std; int main() { int a, b, c; cin &gt;&gt; a &gt;&gt; b &gt;&gt; c; int max\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/64127.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-01-22T12:40:32+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/01\/20260122124030-69721abec3300.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/64127.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/64127.html\",\"name\":\"\u3010C++\u3011 \u5237\u9898\u4e00\u661f\u671f\u7684\u5c0f\u603b\u7ed3(\u5305\u62ec\u6c42\u6700\u5927\u503c\uff0c\u7528\u6570\u7ec4\u50a8\u5b58\u5305\u542b\u7a7a\u683c\u7684\u5b57\u7b26\u4e32\u3001\u5411\u4e0a\u53d6\u6574) - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-01-22T12:40:32+00:00\",\"dateModified\":\"2026-01-22T12:40:32+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/64127.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/64127.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/64127.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u3010C++\u3011 \u5237\u9898\u4e00\u661f\u671f\u7684\u5c0f\u603b\u7ed3(\u5305\u62ec\u6c42\u6700\u5927\u503c\uff0c\u7528\u6570\u7ec4\u50a8\u5b58\u5305\u542b\u7a7a\u683c\u7684\u5b57\u7b26\u4e32\u3001\u5411\u4e0a\u53d6\u6574)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u3010C++\u3011 \u5237\u9898\u4e00\u661f\u671f\u7684\u5c0f\u603b\u7ed3(\u5305\u62ec\u6c42\u6700\u5927\u503c\uff0c\u7528\u6570\u7ec4\u50a8\u5b58\u5305\u542b\u7a7a\u683c\u7684\u5b57\u7b26\u4e32\u3001\u5411\u4e0a\u53d6\u6574) - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/64127.html","og_locale":"zh_CN","og_type":"article","og_title":"\u3010C++\u3011 \u5237\u9898\u4e00\u661f\u671f\u7684\u5c0f\u603b\u7ed3(\u5305\u62ec\u6c42\u6700\u5927\u503c\uff0c\u7528\u6570\u7ec4\u50a8\u5b58\u5305\u542b\u7a7a\u683c\u7684\u5b57\u7b26\u4e32\u3001\u5411\u4e0a\u53d6\u6574) - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"1.\u6c42\u6700\u5927\u503c\u6216\u6700\u5c0f\u503c\u5bf9\u4e00\u4e2a\u521d\u5b66\u8005\u6765\u8bf4&#xff0c;\u5728\u5237\u9898\u7684\u65f6\u5019\u9047\u5230\u8fd9\u79cd\u6c42\u89e3&#xff0c;\u6700\u5927\u503c\u548c\u6700\u5c0f\u503c\u662f\u7279\u522b\u5e38\u89c1\u7684,\u5927\u5bb6\u5728\u9047\u5230\u8fd9\u79cd\u95ee\u9898\u7684\u65f6\u5019&#xff0c;\u662f\u7528\u4ec0\u4e48\u65b9\u6cd5\u5728\u89e3\u51b3\u5462&#xff1f;\u8fd9\u91cc\u63d0\u4f9b\u4e24\u79cd\u5199\u6cd5\u4f9b\u5927\u5bb6\u53c2\u80031.1 \u5e38\u89c4\u5199\u6cd5\u7b2c\u4e00\u79cd\u5199\u6cd5\u3002\u76f8\u4fe1\u5927\u5bb6\u5728\u521d\u5b66\u7f16\u7a0b\u8bed\u8a00\u7684\u65f6\u5019\u4e00\u5b9a\u90fd\u8fd9\u4e48\u5e72\u8fc7#include using namespace std; int main() { int a, b, c; cin &gt;&gt; a &gt;&gt; b &gt;&gt; c; int max","og_url":"https:\/\/www.wsisp.com\/helps\/64127.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-01-22T12:40:32+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/01\/20260122124030-69721abec3300.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/64127.html","url":"https:\/\/www.wsisp.com\/helps\/64127.html","name":"\u3010C++\u3011 \u5237\u9898\u4e00\u661f\u671f\u7684\u5c0f\u603b\u7ed3(\u5305\u62ec\u6c42\u6700\u5927\u503c\uff0c\u7528\u6570\u7ec4\u50a8\u5b58\u5305\u542b\u7a7a\u683c\u7684\u5b57\u7b26\u4e32\u3001\u5411\u4e0a\u53d6\u6574) - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-01-22T12:40:32+00:00","dateModified":"2026-01-22T12:40:32+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/64127.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/64127.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/64127.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u3010C++\u3011 \u5237\u9898\u4e00\u661f\u671f\u7684\u5c0f\u603b\u7ed3(\u5305\u62ec\u6c42\u6700\u5927\u503c\uff0c\u7528\u6570\u7ec4\u50a8\u5b58\u5305\u542b\u7a7a\u683c\u7684\u5b57\u7b26\u4e32\u3001\u5411\u4e0a\u53d6\u6574)"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/64127","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=64127"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/64127\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/64126"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=64127"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=64127"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=64127"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=64127"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}