{"id":5243,"date":"2024-09-23T14:01:01","date_gmt":"2024-09-23T06:01:01","guid":{"rendered":""},"modified":"2024-09-23T14:01:01","modified_gmt":"2024-09-23T06:01:01","slug":"c ++\u9898\u5e93_c++\u57fa\u7840\u77e5\u8bc6","status":"publish","type":"post","link":"https:\/\/mushiming.com\/5243.html","title":{"rendered":"c ++\u9898\u5e93_c++\u57fa\u7840\u77e5\u8bc6"},"content":{"rendered":"

\u76ee\u5f55<\/strong><\/p>\n

\ud83d\udd2e\u524d\u8a00<\/p>\n

\ud83d\udcd5\u5927\u4f53\u6846\u67b6<\/p>\n

\ud83d\udcd7\u6240\u6709string\u5236\u4f5c<\/p>\n

\ud83d\udcb41.question<\/p>\n

\ud83d\udcb52.ans<\/p>\n

\ud83d\udcb63.encourage<\/p>\n

\ud83d\udcd83s\u8df3\u8f6c\u5236\u4f5c<\/p>\n

\ud83d\udcd9\u5b9d\u7bb1\u9875\u5236\u4f5c<\/p>\n

\ud83d\udcd4\u7efc\u5408\u5236\u4f5c<\/p>\n

\ud83e\uddf3\u603b\u7ed3<\/p>\n


\n

\ud83d\udd2e\u524d\u8a00<\/h3>\n
\n

        \u5f80\u671f\u94fe\u63a5\uff1a2.\u5f15\u5b50\u4e0e\u9996\u9875\u90e8\u5206\u5236\u4f5c<\/p>\n

        \u4e0a\u4e00\u671f\uff0c\u6211\u4eec\u5b66\u4e60\u4e86\u5f15\u5b50\u4e0e\u9996\u9875\u90e8\u5206\u7684\u5236\u4f5c\u3002\u672c\u6b21\u6211\u5e26\u5927\u5bb6\u6765\u8ba4\u8bc6\u7b54\u9898\u5668\u57fa\u672c\u5236\u4f5c\u3002<\/p>\n<\/blockquote>\n

\ud83d\udcd5\u5927\u4f53\u6846\u67b6<\/h3>\n
\n

        \u5728\u5236\u4f5c\u7b54\u9898\u5668\u65f6\uff0c\u6211\u4eec\u5927\u4f53\u601d\u8def\u4e3a\uff1a<\/p>\n

string question={\"...\",...};\/\/\u9898\u76ee\u5b57\u7b26\u4e32 string ans=\"ABCD...\";\/\/\u7b54\u6848\u5b57\u7b26\u4e32 string encourage={\"...\",...};\/\/\u7cfb\u7edf\u9f13\u52b1\u5b57\u7b26\u4e32\uff0c\u53ef\u6709\u53ef\u65e0 void questions(){ 1.\u9875\u9762\u989c\u8272\uff0c\u6807\u9898\u7b49; for(int i=1;i<\u9898\u76ee\u6570;i++){ \u8f93\u5165; \u5224\u65ad\uff0cscore++; \u5176\u4ed6; } 2.\u5b9d\u7bb1\u9875\u8df3\u8f6c\u4e0e\u5426 }<\/code><\/pre>\n

        \u4e5f\u5c31\u662f\u5148\u8fdb\u884c\u9898\u76ee\u4e0e\u7b54\u6848\u7684\u6574\u5408\uff0c\u5305\u62ec\u7cfb\u7edf\u63d0\u793a\uff08\u5f85\u4f1a\u4f1a\u8bb2\uff09\u3002\u8fd9\u6837\u4ee3\u7801\u53ef\u8bfb\u6027\u66f4\u9ad8\u3002<\/p>\n<\/blockquote>\n

\ud83d\udcd7\u6240\u6709string\u5236\u4f5c<\/h3>\n
\n

\ud83d\udcb41.question<\/h4>\n

        \u8fd9\u91cc\u6307\u9898\u76ee\u90e8\u5206\u3002\u6211\u4eec\u53ef\u4ee5\u52a0\u4e0a\u9700\u8981\uff081.  2.\u7b49\uff09\uff0c\u4f46\u6700\u597d\u4e0d\u7528\u52a0\uff0c\u5728for\u5faa\u73af\u5185\u518d\u52a0\u3002\u8fd9\u6837\u9898\u76ee\u6b21\u5e8f\u5c31\u6ca1\u6709\u9650\u5236\u3002\u6211\u4eec\u4e00\u822c\u4f1a\u591a\u7528\\n\\n\u7a7a\u884c\u5206\u9694\uff0c\u505a\u7684\u8981\u6e05\u6670\u4e00\u70b9\u3002\u6bd4\u5982\uff1a<\/p>\n

\"c<\/p>\n<\/p>\n

        \u8fd9\u91cc\uff0c\u6211\u7ed9\u51fa\u8303\u4f8b\uff1a<\/p>\n

string question2[6]={\"\u7531\u4e8e\u91cd\u91d1\u5c5e\u77ff\u7269\u7684\u4e0d\u79d1\u5b66\u5f00\u91c7\u548c\u5229\u7528\uff0c\u6ca1\u6709\u9020\u6210\u4e86\u4ec0\u4e48\u73b0\u8c61\uff1f\\n\\nA.\u91d1\u5c5e\u5143\u7d20\u4fb5\u5165\u571f\u58e4\\n\\nB.\u571f\u8d28\u7ed3\u6784\u6539\u53d8\\n\\nC.\u589e\u52a0\u6ce5\u571f\u542b\u91d1\u91cf\uff0c\u9020\u798f\u5f53\u5730\u6751\u6c11\\n\\nD.\u5f71\u54cd\u519c\u4f5c\u7269\u751f\u957f\",\"\u5982\u679c\u6ce5\u7802\u6d8c\u5165\u5927\u6d77\uff0c\u6709\u53ef\u80fd\u53d1\u751f\u4ec0\u4e48\uff1f\\n\\nA.\u5371\u53ca\u6d77\u6d0b\u751f\u7269\u94fe\\n\\nB.\u5f15\u53d1\u6d2a\u707e\\n\\nC.\u6d77\u6c34\u6df9\u6ca1\u9646\u5730\\n\\nD.\u586b\u6d77\u9020\u5730\u540e\u591a\u690d\u6811\u5c31\u4f1a\u5bf9\u73af\u5883\u597d\",\"\u751f\u6001\u6587\u660e\u662f\u6307\u4ec0\u4e48\uff1f\\n\\nA.\u4eba\u7c7b\u9075\u5faa\u793e\u4f1a\u4e3b\u4e49\uff0c\u5171\u4ea7\u4e3b\u4e49\u4e0e\u73af\u5883\u4fdd\u62a4\u4e09\u8005\u7cbe\u795e\u6210\u679c\u7684\u603b\u548c\\n\\nB.\u4eba\u7c7b\u9075\u5faa\u4eba\u3001\u81ea\u7136\u3001\u793e\u4f1a\u548c\u8c10\u53d1\u5c55\u8fd9\u4e00\u5ba2\u89c2\u89c4\u5f8b\u800c\u53d6\u5f97\u7684\u7269\u8d28\u4e0e\u7cbe\u795e\u6210\u679c\u7684\u603b\u548c\\n\\nC.\u4eba\u4eec\u62e5\u6709\u4fdd\u62a4\u73af\u5883\u7684\u4e60\u60ef\\n\\nD.\u5efa\u8bbe\u5d07\u660e\u4e1c\u6ee9\u6e7f\u5730\",\"\u4ece\u54ea\u4e09\u5927\u6548\u76ca\u7684\u9700\u8981\u6765\u770b\uff0c\u5c71\u533a\u7684\u81ea\u7136\u5730\u8c8c\u51b3\u5b9a\u4e86\u6700\u9002\u5b9c\u53d1\u5c55\u7684\u5c31\u662f\u6797\u4e1a\uff1f\\n\\nA.\u7ecf\u5546\uff0c\u65c5\u6e38\u4e1a\uff0c\u7ecf\u6d4e\\n\\nB.\u73af\u5883\uff0c\u98ce\u6c14\uff0c\u6001\u5ea6\\n\\nC.\u6c11\u4e3b\uff0c\u5bcc\u5f3a\uff0c\u667a\u6167\\n\\nD.\u7ecf\u6d4e\u3001\u793e\u4f1a\u3001\u751f\u6001\",\"\u690d\u6811\u9020\u6797\u5e94\u9075\u5faa\u4ec0\u4e48\uff1f\\n\\nA.\u96e8\u6c34\u591a\uff0c\u571f\u5730\u80a5\u6c83\\n\\nB.\u5929\u65f6\u3001\u5730\u5229\u3001\u4eba\u548c\\n\\nC.\u5fc3\u60c5\u597d\u5c31\u884c\\n\\nD.\u4e0e\u6811\u4ea4\u6d41\u611f\u60c5\"};<\/code><\/pre>\n

\ud83d\udcb52.ans<\/h4>\n

        ans\u6307\u56de\u7b54\u7ed3\u679c\u3002\u5bf9\u4e8e\u4e00\u9898\u7ed9\u4e00\u4e2a\u5927\u5199\u5b57\u6bcd\uff08\u5c0f\u5199\u4e5f\u4e0d\u662f\u4e0d\u884c\uff0c\u5c31\u662f\u540e\u9762\u9700\u8981\u6539\u53d8\u5904\u7406\u65b9\u5f0f\uff09<\/p>\n

        \u4ed6\u53ea\u7528\u4e00\u4e2astring\u5c31\u53ef\u4ee5\u5b8c\u6210\u3002\u4f8b\u5982\uff1a<\/p>\n

string ans=\"CDAAB\";<\/code><\/pre>\n

\ud83d\udcb63.encourage<\/h4>\n

        \u7cfb\u7edf\u63d0\u793a\u3002\u6307\u4f5c\u5bf9\u51e0\u9053\u9898\uff0c\u5c31\u7ed9\u4e0d\u540c\u7684\u9f13\u52b1\u3002\u76f4\u63a5\u7ed9\u5230\uff1a<\/p>\n

string encourage[30]={\"\u4e00\u5f80\u65e0\u524d\uff0c\u8def\u6f2b\u6f2b\u5176\u4fee\u8fdc\u516e\uff01\u606d\u559c\u60a8\u7b54\u5bf91\u9898\uff01\",\"\u4f17\u671b\u6538\u5f52\uff0c\u66fe\u65e0\u4e0e\u4e8c\uff01\u4e14\u559c\u9752\u4e91\u8db3\u4e0b\u751f\uff01\u606d\u559c\u60a8\u7b54\u5bf92\u9898\uff01\",\"\u97e6\u7f16\u4e09\u7edd\uff0c\u89c2\u9685\u53cd\u4e09\uff0c\u4e66\u4e2d\u81ea\u6709\u989c\u5982\u7389\uff01\u606d\u559c\u60a8\u7b54\u5bf93\u9898\uff01\",\"\u7cbe\u8bda\u6240\u81f3\uff0c\u91d1\u77f3\u4e3a\u5f00\u3002\u540d\u626c\u56db\u6d77\uff0c\u6307\u65e5\u53ef\u5f85\uff01\u606d\u559c\u60a8\u7b54\u5bf94\u9898\uff01\",\"\u5b66\u5bcc\u4e94\u8f66\uff0c\u6885\u82b1\u9999\u81ea\u82e6\u5bd2\u6765\uff01\u606d\u559c\u60a8\u7b54\u5bf95\u9898\uff01\",\"\u56db\u6e05\u516d\u6d3b\uff0c\u5929\u751f\u6211\u6750\u5fc5\u6709\u7528\uff01\u606d\u559c\u60a8\u7b54\u5bf96\u9898\uff01\",\"\u4e03\u6b65\u6210\u8bd7\uff0c\u6211\u8f88\u5c82\u662f\u84ec\u84bf\u4eba\uff01\u606d\u559c\u60a8\u7b54\u5bf97\u9898\uff01\",\"\u516b\u6597\u4e4b\u624d\uff0c\u6307\u793a\u9752\u4e91\u501f\u7fbd\u7ff0\uff01\u606d\u559c\u60a8\u7b54\u5bf98\u9898\uff01\",\"\u58f0\u95fb\u4e5d\u768b\uff0c\u5353\u5c14\u8d85\u7fa4\uff0c\u4e5d\u4e07\u629f\u6276\u6392\u7fbd\u7ffc\uff01\u606d\u559c\u60a8\u7b54\u5bf99\u9898\uff01\",\"\u5341\u5e74\u5bd2\u7a97\u9022\u4f73\u65e5\uff0c\u4e14\u559c\u9752\u4e91\u8db3\u4e0b\u751f\uff01\u606d\u559c\u60a8\u7b54\u5bf910\u9898\uff01\",\"\u91d1\u699c\u9ad8\u60ac\u59d3\u5b57\u771f\uff0c\u5206\u660e\u6298\u5f97\u4e00\u679d\u6625\uff01\u606d\u559c\u60a8\u7b54\u5bf911\u9898\uff01\",\"\u6d77\u9614\u51ed\u9c7c\u8dc3\uff0c\u5929\u9ad8\u4efb\u9e1f\u98de\uff01\u606d\u559c\u60a8\u7b54\u5bf912\u9898\uff01\",\"\u5343\u6dd8\u4e07\u6f09\u867d\u8f9b\u82e6\uff0c\u5439\u5c3d\u72c2\u6c99\u59cb\u5230\u91d1\uff01\u606d\u559c\u60a8\u7b54\u5bf913\u9898\uff01\",\"\u4e09\u4e07\u91cc\u6cb3\u4e1c\u5165\u6d77\uff0c\u4e94\u5343\u4ede\u5cb3\u4e0a\u6469\u5929\uff01\u606d\u559c\u60a8\u7b54\u5bf914\u9898\uff01\",\"\u4e0d\u754f\u6d6e\u4e91\u906e\u671b\u773c\uff0c\u81ea\u7f18\u8eab\u5728\u6700\u9ad8\u5c42\uff01\u606d\u559c\u60a8\u7b54\u5bf915\u9898\uff01\",\"\u5faa\u5e8f\u800c\u6e10\u8fdb\uff0c\u719f\u8bfb\u4e14\u7cbe\u601d\u3002\u606d\u559c\u60a8\u7b54\u5bf916\u9898\uff01\",\"\u6625\u98ce\u5f97\u610f\u9a6c\u8e44\u75be\uff0c\u4e00\u65e5\u770b\u5c3d\u957f\u5b89\u82b1\uff01\u606d\u559c\u60a8\u7b54\u5bf917\u9898\",\"\u64cd\u5343\u66f2\u800c\u540e\u6653\u58f0\uff0c\u89c2\u5343\u5251\u800c\u540e\u8bc6\u5668\uff01\u606d\u559c\u60a8\u7b54\u5bf918\u9898\uff01\",\"\u5c11\u5e74\u83ab\u5760\u9752\u4e91\u5fd7\uff0c\u6562\u8bb8\u5929\u4e0b\u7b2c\u4e00\u6d41\uff01\u606d\u559c\u60a8\u7b54\u5bf919\u9898\uff01\",\"\u4e00\u4e07\u5e74\u6765\u8c01\u8457\u53f2\uff0c\u516b\u5343\u91cc\u5916\u89c5\u8bf8\u4faf\uff01\u606d\u559c\u60a8\uff0c\u7b54\u5bf9\uff0c20\u9898\uff01\uff01\uff01\"}; <\/code><\/pre>\n

        \u662f\u4e0d\u662f\u5f88\u6709\u6587\u5b66\u6c14\u606f\uff1f\u5176\u662f\u8fd9\u662f\u73b0\u5728\u5e0c\u671b\u5b66\u7684\u7cfb\u7edf\u63d0\u793a\uff0c\u4f5c\u8005\u501f\u9274\u6a21\u4eff\u3002<\/p>\n

\"c<\/p>\n<\/blockquote>\n

\ud83d\udcd83s\u8df3\u8f6c\u5236\u4f5c<\/h3>\n
\n

        \u4e00\u4e9b3s\u8df3\u8f6c\uff0c\u5f80\u5f80\u662f\u5927\u5bb6\u5728\u4e00\u4e9b\u5c0f\u6e38\u620f\u5185\u53ef\u4ee5\u666e\u904d\u770b\u5230\u7684\u3002\u5bf9\u4e8eC++\u76843s\u8df3\u8f6c\uff0c\u6211\u4eec\u5b9c\u53ef\u8f7b\u677e\u5b8c\u6210\u3002<\/p>\n

        \u8fd9\u91cc\u7528\u5230\u4e86\u9000\u683c\u952e\\b\u7684\u7528\u6cd5\uff0c\u6709\u4e0d\u6e05\u695a\u7684\u53ef\u4ee5\u770b\u6211\u7684\u5f80\u671f\u6587\u7ae0\uff1a<\/p>\n

        \u5f80\u671f\u6587\u7ae0\uff1a\u8be6\u89e3\u90a3\u4e9bC++\u4e2d\u7279\u6b8a\u7684\u8f6c\u4e49\u5b57\u7b26\uff08\\b, \\r, \\f \u7b49\uff09<\/p>\n

        \u5148\u770b\u4e00\u770b\u666e\u901a\u8df3\u8f6c\uff1a<\/p>\n

cout<<\"\\n\\n\\t3s\u540e\u8df3\u8f6c...\"; Sleep(1000); cout<<\"\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b2s\u540e\u8df3\u8f6c...\"; Sleep(1000); cout<<\"\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b1s\u540e\u8df3\u8f6c...\"; Sleep(1000);<\/code><\/pre>\n

        \u6211\u4eec\u8fd8\u53ef\u4ee5\u6539\u6210\u8df3\u8f6c\u9996\u9875\uff0c\u8df3\u8f6c\u81f3\u4e0b\u4e00\u9898\u3002\u4f46\u8bb0\u4f4f\uff0c\u4e2d\u6587\u5b57\u7b26\u5360\u4e24\u4e2a\u4f4d\uff0c\u9700\u8981\u4e24\u4e2a\\b\u7b26\uff01\uff01\uff01<\/strong><\/span> <\/p>\n

        \u5176\u4ed6\u6ca1\u4ec0\u4e48\u597d\u8bf4\u7684\uff0c\u6211\u4eec\u7ee7\u7eed\u3002<\/p>\n<\/blockquote>\n

\ud83d\udcd9\u5b9d\u7bb1\u9875\u5236\u4f5c<\/h3>\n
\n

        \u6211\u4eec\u5148\u5b66\u4e60\u5982\u4f55\u505a\u5b9d\u7bb1\u3002\u5b9d\u7bb1\u4e3b\u8981\u7528\u989c\u6587\u5b57\uff1a<\/p>\n

 \/###((\\o\/))####\/ | \/_____\/\/^\\\\____\/# | | # |# | | \u8d85 # \u5b9d |# | | \u7ea7 # \u7bb1 |#\/ |_______#____ __|\/ \u606d\u559c\u4f60\u5168\u505a\u5bf9\u4e86\uff0c\u70b9\u51fbx\u952e\u9886\u53d6\u5b9d\u7bb1\uff01)<\/code><\/pre>\n

        \u6211\u4eec\u9700\u8981\u5148\u8f93\u51fa\u5b9d\u7bb1\u56fe\u6848\uff0c\u5728\u8fdb\u884cgetch()=='x'\u4e0e\u5426\u8fdb\u884c\u5224\u65ad\u3002\u7528\u6237\u70b9\u51fbx\u952e\uff0c\u8fdb\u884c\u5b9d\u7bb1\u9886\u53d6\uff0c\u91d1\u5e01\u6dfb\u52a0\u3002<\/p>\n

        \u4e3a\u4e86\u4fdd\u8bc1\u91d1\u5e01\u6570\u4e0e\u8fd4\u56de\u5230\u539f\u9875\u9762\uff0c\u6211\u4eec\u8fd8\u9700\u8981\u7ed9\u5b9a\u53c2\u6570n\u4ee3\u8868\u91d1\u5e01\u6570\u4e14\u5b57\u7b26w\u4ee3\u8868\u539f\u9875\u9762\u3002\u8fd9\u91cc\u539f\u9875\u9762\u7684\u51fd\u6570\u6839\u636e\u81ea\u5df1\u7684\u8981\u6c42\u6240\u5b9a\u3002<\/p>\n

        \u6240\u4ee5\u4ee3\u7801\u4e3a\uff1a<\/p>\n

void chest(int n,char w){ rgb_set(255,97,0,189,252,201); system(\"cls\"); system(\"title \u5f00\u5b9d\u7bb1\"); cout<<\"\\t\\t\\t\\t\"; alert(\"\u5b9d\u7bb1\\n\\n\"); rgb_set(255,153,18,189,252,201); cout<<\"\\t\\t\\t \u25ce\u91d1\u5e01\uff1a\"<<corn<<\"\\n\"; rgb_set(255,97,0,189,252,201); Slert(\" \/###((\\\\o\/))####\/ |\\n \/_____\/\/^\\\\\\\\____\/# |\\n | # |# |\\n | \u8d85 # \u5b9d |# |\\n | \u7ea7 # \u7bb1 |#\/\\n |_______#____ __|\/\\n \u606d\u559c\u4f60\u5168\u505a\u5bf9\u4e86\uff0c\u70b9\u51fbx\u952e\u9886\u53d6\u5b9d\u7bb1\uff01)\"); while(1){ switch(getch()){ case 'x':{ system(\"cls\"); cout<<\"\\t\\t\\t\\t\"; alert(\"\u5b9d\u7bb1\\n\\n\"); rgb_set(255,153,18,189,252,201); cout<<\"\\t\\t\\t \u25ce\u91d1\u5e01\uff1a\"<<corn<<\"\\n\"; corn+=n; rgb_set(255,97,0,189,252,201); if(n<10){ Slert(\"\\\\ \u606d\u559c\u60a8\u83b7\u5f97\u4e86 \/\\n \\\\ \"); cout<<n; Slert(\" \/\\n \\\\ \u679a \/\\n \\\\ \u25ce \/\\n \\\\ \/\\n\\n\\n\"); }else{ Slert(\"\\\\ \u606d\u559c\u60a8\u83b7\u5f97\u4e86 \/\\n \\\\ \"); cout<<n; Slert(\" \/\\n \\\\ \u679a \/\\n \\\\ \u25ce \/\\n \\\\ \/\\n\\n\\n\"); } rgb_set(0,97,255,189,252,201); cout<<\"\\n\\n\\t3s\u540e\u8fd4\u56de...\"; Sleep(1000); cout<<\"\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b2s\u540e\u8fd4\u56de...\"; Sleep(1000); cout<<\"\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b1s\u540e\u8fd4\u56de...\"; Sleep(1000); if(w=='1') page1_environment_protect(); else if(w=='2') page2_make_changes(); else if(w=='3') page3_new_materials(); else homepage(); break; } case 'X':{ system(\"cls\"); cout<<\"\\t\\t\\t\\t\"; alert(\"\u5b9d\u7bb1\\n\\n\"); rgb_set(255,153,18,189,252,201); cout<<\"\\t\\t\\t \u25ce\u91d1\u5e01\uff1a\"<<corn<<\"\\n\"; corn+=n; rgb_set(255,97,0,189,252,201); if(n<10){ Slert(\"\\\\ \u606d\u559c\u60a8\u83b7\u5f97\u4e86 \/\\n \\\\ \"); cout<<n; Slert(\" \/\\n \\\\ \u679a \/\\n \\\\ \u25ce \/\\n \\\\ \/\\n\\n\\n\"); }else{ Slert(\"\\\\ \u606d\u559c\u60a8\u83b7\u5f97\u4e86 \/\\n \\\\ \"); cout<<n; Slert(\" \/\\n \\\\ \u679a \/\\n \\\\ \u25ce \/\\n \\\\ \/\\n\\n\\n\"); } rgb_set(0,97,255,189,252,201); cout<<\"\\n\\n\\t3s\u540e\u8fd4\u56de...\"; Sleep(1000); cout<<\"\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b2s\u540e\u8fd4\u56de...\"; Sleep(1000); cout<<\"\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b1s\u540e\u8fd4\u56de...\"; Sleep(1000); if(w=='1') page1_environment_protect(); else if(w=='2') page2_make_changes(); else if(w=='3') page3_new_materials(); else homepage(); break; } } } }<\/code><\/pre>\n<\/blockquote>\n

\ud83d\udcd4\u7efc\u5408\u5236\u4f5c<\/h3>\n
\n

        \u63a5\u7740\uff0c\u6211\u4eec\u6765\u5b8c\u6210\u7b54\u9898\u90e8\u5206\u5236\u4f5c\u3002<\/p>\n

        \u76f4\u63a5\u4e0a\u4ee3\u7801\uff1a<\/p>\n

void questions(){ rgb_set(0,0,0,189,252,201); system(\"cls\"); system(\"title \u8da3\u5473\u7b54\u9898\"); cout<<\"\\t\\t\\t\\t\"; Slert(\"\u8da3\u5473\u7b54\u9898\\n\\n\"); rgb_set(255,153,18,189,252,201); cout<<\"\\t\\t\\t \u25ce\u91d1\u5e01\uff1a\"<<corn<<\"\\n\"; rgb_set(48,128,20,189,252,201); int score=0; char answ; for(int i=1;i<=5;i++){ cout<<i<<'.'; Slert(question[i-1]); Slert(\"\\n\\n\u8bf7\u8f93\u5165\u60a8\u7684\u7b54\u6848\uff1a_____\\b\\b\\b\\b\\b\"); cin>>answ; if(answ==ans[i-1]||answ==ans[i-1]+32){ corn++; rgb_set(0,0,0,189,252,201); system(\"cls\"); cout<<\"\\t\\t\\t\\t\"; cout<<\"\u8da3\u5473\u7b54\u9898\\n\\n\"; rgb_set(255,153,18,189,252,201); cout<<\"\\t\\t\\t \u25ce\u91d1\u5e01\uff1a\"<<corn<<\"\\n\"; rgb_set(0,50,240,189,252,201); Slert(\"\\t\u7cfb\u7edf\u63d0\u793a\uff1a\"); Slert(encourage[score++]); }else{ rgb_set(0,0,0,189,252,201); system(\"cls\"); cout<<\"\\t\\t\\t\\t\"; cout<<\"\u8da3\u5473\u7b54\u9898\\n\\n\"; rgb_set(255,153,18,189,252,201); cout<<\"\\t\\t\\t \u25ce\u91d1\u5e01\uff1a\"<<corn<<\"\\n\"; rgb_set(0,50,240,189,252,201); Slert(\"\\t\u7cfb\u7edf\u63d0\u793a\uff1a\u4fe1\u5fc3\u6765\u81ea\u4e8e\u5b9e\u529b\uff0c\u5b9e\u529b\u6765\u81ea\u4e8e\u52e4\u594b\u3002\u7ee7\u7eed\u52a0\u6cb9\uff01\"); } rgb_set(255,0,0,189,252,201); if(i!=5){ cout<<\"\\n\\n\\t3s\u540e\u8df3\u8f6c\u5230\u4e0b\u4e00\u9898...\"; Sleep(1000); cout<<\"\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b2s\u540e\u8df3\u8f6c\u5230\u4e0b\u4e00\u9898...\"; Sleep(1000); cout<<\"\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b1s\u540e\u8df3\u8f6c\u5230\u4e0b\u4e00\u9898...\"; Sleep(1000); }else{ cout<<\"\\n\\n\\t3s\u540e\u8df3\u8f6c...\"; Sleep(1000); cout<<\"\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b2s\u540e\u8df3\u8f6c...\"; Sleep(1000); cout<<\"\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b1s\u540e\u8df3\u8f6c...\"; Sleep(1000); } rgb_set(0,0,0,189,252,201); system(\"cls\"); cout<<\"\\t\\t\\t\\t\"; cout<<\"\u8da3\u5473\u7b54\u9898\\n\\n\"; rgb_set(255,153,18,189,252,201); cout<<\"\\t\\t\\t \u25ce\u91d1\u5e01\uff1a\"<<corn<<\"\\n\"; rgb_set(48,128,20,189,252,201); } if(score==5){ chest(5,'1'); } alert(\"\\n\\t\u606d\u559c\u60a8\u5b8c\u6210\u7b54\u9898\uff0c\u70b9\u51fbR\u8fd4\u56de\u3002\"); while(1){ switch(getch()){ case 'r': \u539f\u51fd\u6570; break; case 'R': \u539f\u51fd\u6570; break; } } } <\/code><\/pre>\n

        \u505a\u51fa\u6765\u6548\u679c\u5341\u5206\u7684\u4e0d\u9519\u3002\u5927\u5bb6\u5982\u679c\u4e0d\u60f3\u505a\u5927\u7684\u9879\u76ee\uff0c\u53ea\u60f3\u505a\u4e00\u4e2a\u7b54\u9898\u5668\uff0c\u53ef\u4ee5\u5bf9\u6b64\u4ee3\u7801\u8fdb\u884c\u5220\u6539\u3002<\/p>\n<\/blockquote>\n

\ud83e\uddf3\u603b\u7ed3<\/h3>\n
\n

        \u672c\u671f\u6211\u5e26\u5927\u5bb6\u5b66\u4e86\uff1a<\/strong><\/p>\n

        \u7b54\u9898\u5668\u4e2d\u7684string\uff0c3s\u8df3\u8f6c\uff0c\u5b9d\u7bb1\u9875\uff0c\u7b54\u9898\u5668\u5236\u4f5c\u3002<\/p>\n

\"c  <\/p>\n

        \u4e0b\u6b21\u6211\u4eec\u8fdb\u884c\u7efc\u5408\u5b8c\u5584\u73af\u8282\uff0c\u975e\u5e38\u7cbe\u5f69\uff0c\u656c\u8bf7\u671f\u5f85\u3002<\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"c ++\u9898\u5e93_c++\u57fa\u7840\u77e5\u8bc6\u5e26\u4f60\u5b66\u4f1aC++\u6587\u5b57\u9875\u9762\u7c7b\u9879\u76ee\u2014\u20143.\u7b54\u9898\u5668\u5236\u4f5c_\u7b54\u9898\u5668\u600e\u4e48\u5199","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"_links":{"self":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts\/5243"}],"collection":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/comments?post=5243"}],"version-history":[{"count":0,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts\/5243\/revisions"}],"wp:attachment":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/media?parent=5243"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/categories?post=5243"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/tags?post=5243"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}