{"id":95,"date":"2024-05-30T16:49:37","date_gmt":"2024-05-30T08:49:37","guid":{"rendered":"http:\/\/blog.huanmie.fun\/?p=95"},"modified":"2024-06-04T10:48:42","modified_gmt":"2024-06-04T02:48:42","slug":"c%e8%af%ad%e8%a8%80-%e5%87%af%e6%92%92%e5%8a%a0%e5%af%86","status":"publish","type":"post","link":"https:\/\/blog.huanmie.fun\/index.php\/2024\/05\/30\/c%e8%af%ad%e8%a8%80-%e5%87%af%e6%92%92%e5%8a%a0%e5%af%86\/","title":{"rendered":"C\u8bed\u8a00 \u51ef\u6492\u52a0\u5bc6"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><strong>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/strong>\u53e4\u7f57\u9a6c\u65f6\u671f\uff0c\u51ef\u6492\u5927\u5e1d\u66fe\u7ecf\u4f7f\u7528\u5bc6\u7801\u6765\u4f20\u9012\u4fe1\u606f\uff0c\u5b83\u662f\u4e00\u79cd\u66ff\u4ee3\u5bc6\u7801\uff0c\u5bf9\u4e8e\u4fe1\u4ef6\u4e2d\u7684\u6bcf\u4e2a\u5b57\u6bcd\uff0c\u4f1a\u7528\u5176\u5b83\u5b57\u6bcd\u4ee3\u66ff\uff0c\u6bd4\u5982\uff1aa\u7528s\u4ee3\u66ff\uff0cb\u7528u\u6765\u4ee3\u66ff\uff0c\u5177\u4f53\u66ff\u6362\u89c4\u5219\u5982\u4e0b\u8868\u6240\u793a\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"824\" height=\"109\" src=\"http:\/\/blog.huanmie.fun\/wp-content\/uploads\/2024\/05\/image-11.png\" alt=\"\" class=\"wp-image-96\" srcset=\"https:\/\/blog.huanmie.fun\/wp-content\/uploads\/2024\/05\/image-11.png 824w, https:\/\/blog.huanmie.fun\/wp-content\/uploads\/2024\/05\/image-11-300x40.png 300w, https:\/\/blog.huanmie.fun\/wp-content\/uploads\/2024\/05\/image-11-768x102.png 768w\" sizes=\"auto, (max-width: 824px) 100vw, 824px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b9e\u73b0\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#include &lt;stdio.h&gt;\nvoid jiami(char &#91;]);\nvoid jiemi(char &#91;]); \nint i=0;\nint main(){\n\tint u;\n\tchar str&#91;100];\n\tprintf(\"\u52a0\u5bc6\u8bf7\u952e\u5165\u201c1 \u201d\uff0c\u89e3\u5bc6\u8bf7\u952e\u5165\u201c2 \u201d:  \"); \n\tscanf(\"%d\",&amp;u);\n\tif(u==1){\n\tprintf(\"\u8bf7\u8f93\u5165\u8981\u52a0\u5bc6\u7684\u5b57\u6bb5(100\u4e2a\u5b57\u7b26\u4ee5\u5185)\uff1a\\n\");\n\tfflush(stdin);\/\/\u6e05\u7a7a\u6587\u4ef6\u7f13\u51b2\u533a\n\t\/\/scanf(\"%s\",str); \n\tgets(str);\n\tprintf(\"\u52a0\u5bc6\u7ed3\u679c\u4e3a\uff1a\\n\");\n\tjiami(str);\/\/\u8c03\u7528\u52a0\u5bc6 \n\t}else{\n\t    if(u==2){\n\t    printf(\"\u8bf7\u8f93\u5165\u8981\u89e3\u5bc6\u7684\u5b57\u6bb5(100\u4e2a\u5b57\u7b26\u4ee5\u5185)\uff1a\\n\");\n\t    fflush(stdin);\/\/\u6e05\u7a7a\u6587\u4ef6\u7f13\u51b2\u533a\n\t    \/\/scanf(\"%s\",str); \n\t    gets(str);\n\t    printf(\"\u89e3\u5bc6\u7ed3\u679c\u4e3a\uff1a\\n\");\n\t    jiemi(str);\/\/\u8c03\u7528\u89e3\u5bc6 \n\t    \/\/scanf(\"%s\",str); \n\t}else{\n\tprintf(\"\u8f93\u5165\u9519\u8bef\"); \n\t}\n\t}\n}\nvoid jiami(char str&#91;100]){\/\/\u52a0\u5bc6\u7b97\u6cd5 \n\tif(str&#91;i]!='\\0'){\n\t\tif(str&#91;i]==65||str&#91;i]==97) str&#91;i]+=18; \n\t\telse \n\t    if(str&#91;i]==66||str&#91;i]==98) str&#91;i]+=19;\n\t\telse \n\t\tif(str&#91;i]==67||str&#91;i]==99) str&#91;i]+=20;\n\t\telse \n\t\tif(str&#91;i]==68||str&#91;i]==100) str&#91;i]+=21;\n\t\telse \n\t\tif(str&#91;i]==69||str&#91;i]==101) str&#91;i]-=4;\n\t\telse \n\t\tif(str&#91;i]==70||str&#91;i]==102) str&#91;i]-=3;\n\t\telse \n\t\tif(str&#91;i]==71||str&#91;i]==103) str&#91;i]-=2;\n\t\telse \n\t\tif(str&#91;i]==72||str&#91;i]==104) str&#91;i]-=1;\n\t\telse \n\t\tif(str&#91;i]==73||str&#91;i]==105) ;\n\t\telse \n\t\tif(str&#91;i]==74||str&#91;i]==106) str&#91;i]+=1;\n\t\telse \n\t\tif(str&#91;i]==75||str&#91;i]==107) str&#91;i]+=2;\n\t\telse \n\t\tif(str&#91;i]==76||str&#91;i]==108) str&#91;i]+=3;\n\t\telse \n\t\tif(str&#91;i]==77||str&#91;i]==109) str&#91;i]+=4;\n\t\telse \n\t\tif(str&#91;i]==78||str&#91;i]==110) str&#91;i]+=4;\n\t\telse \n\t\tif(str&#91;i]==79||str&#91;i]==111) str&#91;i]+=5;\n\t\telse \n\t\tif(str&#91;i]==80||str&#91;i]==112) str&#91;i]+=6;\n\t\telse \n\t\tif(str&#91;i]==81||str&#91;i]==113) str&#91;i]+=7;\n\t\telse \n\t\tif(str&#91;i]==82||str&#91;i]==114) str&#91;i]+=8;\n\t\telse \n\t\tif(str&#91;i]==83||str&#91;i]==115) str&#91;i]-=17;\n\t\telse \n\t\tif(str&#91;i]==84||str&#91;i]==116) str&#91;i]-=16;\n\t\telse \n\t\tif(str&#91;i]==85||str&#91;i]==117) str&#91;i]-=15;\n\t\telse \n\t\tif(str&#91;i]==86||str&#91;i]==118) str&#91;i]-=14;\n\t\telse \n\t\tif(str&#91;i]==87||str&#91;i]==119) str&#91;i]-=13;\n\t\telse\n\t\tif(str&#91;i]==88||str&#91;i]==120) str&#91;i]-=12;\n\t\telse\n\t\tif(str&#91;i]==89||str&#91;i]==121) str&#91;i]-=11;\n\t\telse\n\t\tif(str&#91;i]==90|str&#91;i]==122) str&#91;i]-=10;\n\t\t\n\t\tprintf(\"%c\",str&#91;i]);\n\t    i++;\n\t\tjiami(str);\n\t\t}\n}\nvoid jiemi(char str&#91;100]){\/\/\u89e3\u5bc6\u7b97\u6cd5 \n\tif(str&#91;i]!='\\0'){\n\t\tif(str&#91;i]==65||str&#91;i]==97) str&#91;i]+=4;\n\t\telse \n\t    if(str&#91;i]==66||str&#91;i]==98) str&#91;i]+=17;\n\t\telse \n\t\tif(str&#91;i]==67||str&#91;i]==99) str&#91;i]+=3;\n\t\telse \n\t\tif(str&#91;i]==68||str&#91;i]==100) str&#91;i]+=16;\n\t\telse \n\t\tif(str&#91;i]==69||str&#91;i]==101) str&#91;i]+=2;\n\t\telse \n\t\tif(str&#91;i]==70||str&#91;i]==102) str&#91;i]+=15;\n\t\telse \n\t\tif(str&#91;i]==71||str&#91;i]==103) str&#91;i]+=1;\n\t\telse \n\t\tif(str&#91;i]==72||str&#91;i]==104) str&#91;i]+=14;\n\t\telse \n\t\tif(str&#91;i]==73||str&#91;i]==105) ;\n\t\telse \n\t\tif(str&#91;i]==74||str&#91;i]==106) str&#91;i]+=13;\n\t\telse \n\t\tif(str&#91;i]==75||str&#91;i]==107) str&#91;i]-=1;\n\t\telse \n\t\tif(str&#91;i]==76||str&#91;i]==108) str&#91;i]+=12;\n\t\telse \n\t\tif(str&#91;i]==77||str&#91;i]==109) str&#91;i]+=4;\n\t\telse \n\t\tif(str&#91;i]==78||str&#91;i]==110) str&#91;i]+=11;\n\t\telse \n\t\tif(str&#91;i]==79||str&#91;i]==111) str&#91;i]-=3;\n\t\telse \n\t\tif(str&#91;i]==80||str&#91;i]==112) str&#91;i]+=10;\n\t\telse \n\t\tif(str&#91;i]==81||str&#91;i]==113) str&#91;i]-=4;\n\t\telse \n\t\tif(str&#91;i]==82||str&#91;i]==114) str&#91;i]-=4;\n\t\telse \n\t\tif(str&#91;i]==83||str&#91;i]==115) str&#91;i]-=18;\n\t\telse \n\t\tif(str&#91;i]==84||str&#91;i]==116) str&#91;i]-=5;\n\t\telse \n\t\tif(str&#91;i]==85||str&#91;i]==117) str&#91;i]-=17;\n\t\telse \n\t\tif(str&#91;i]==86||str&#91;i]==118) str&#91;i]-=6;\n\t\telse \n\t\tif(str&#91;i]==87||str&#91;i]==119) str&#91;i]-=20;\n\t\telse\n\t\tif(str&#91;i]==88||str&#91;i]==120) str&#91;i]-=7;\n\t\telse\n\t\tif(str&#91;i]==89||str&#91;i]==121) str&#91;i]-=21;\n\t\telse\n\t\tif(str&#91;i]==90|str&#91;i]==122) str&#91;i]-=8;\n\t\t\n\t\tprintf(\"%c\",str&#91;i]);\n\t    i++;\n\t\tjiemi(str);\n\t\t} \n}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u53e4\u7f57\u9a6c\u65f6\u671f\uff0c\u51ef\u6492\u5927\u5e1d\u66fe\u7ecf\u4f7f\u7528\u5bc6\u7801\u6765\u4f20\u9012\u4fe1\u606f\uff0c\u5b83\u662f\u4e00\u79cd\u66ff\u4ee3\u5bc6\u7801\uff0c\u5bf9\u4e8e\u4fe1\u4ef6\u4e2d\u7684\u6bcf\u4e2a\u5b57\u6bcd\uff0c\u4f1a\u7528\u5176\u5b83\u5b57\u6bcd\u4ee3\u66ff\uff0c\u6bd4\u5982\uff1aa\u7528s &#8230;<\/p>\n","protected":false},"author":1,"featured_media":96,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"emotion":"","emotion_color":"","title_style":"","license":"","footnotes":""},"categories":[5],"tags":[],"class_list":["post-95","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-c"],"_links":{"self":[{"href":"https:\/\/blog.huanmie.fun\/index.php\/wp-json\/wp\/v2\/posts\/95","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.huanmie.fun\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.huanmie.fun\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.huanmie.fun\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.huanmie.fun\/index.php\/wp-json\/wp\/v2\/comments?post=95"}],"version-history":[{"count":2,"href":"https:\/\/blog.huanmie.fun\/index.php\/wp-json\/wp\/v2\/posts\/95\/revisions"}],"predecessor-version":[{"id":99,"href":"https:\/\/blog.huanmie.fun\/index.php\/wp-json\/wp\/v2\/posts\/95\/revisions\/99"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.huanmie.fun\/index.php\/wp-json\/wp\/v2\/media\/96"}],"wp:attachment":[{"href":"https:\/\/blog.huanmie.fun\/index.php\/wp-json\/wp\/v2\/media?parent=95"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.huanmie.fun\/index.php\/wp-json\/wp\/v2\/categories?post=95"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.huanmie.fun\/index.php\/wp-json\/wp\/v2\/tags?post=95"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}