{"id":963,"date":"2012-07-17T23:49:07","date_gmt":"2012-07-17T15:49:07","guid":{"rendered":"http:\/\/www.hsyyf.me\/?p=963"},"modified":"2012-07-17T23:56:32","modified_gmt":"2012-07-17T15:56:32","slug":"%e4%b8%80%e6%ae%b5%e6%af%94%e8%be%83yd%e7%9a%84%e4%bb%a3%e7%a0%81%e3%80%82%e3%80%82%e3%80%82","status":"publish","type":"post","link":"https:\/\/www.hsyyf.me\/?p=963","title":{"rendered":"\u4e00\u6bb5\u6bd4\u8f83YD\u7684\u4ee3\u7801\u3002\u3002\u3002"},"content":{"rendered":"<p>\u8bf4\u662fYD\uff0c\u4e3b\u8981\u662f\u770b\u5e72\u4ec0\u4e48\u7528\u4e86\u3002\u7cbe\u7b80\u4e86\u4e00\u4e0bprintf\u5185\u7684\u5185\u5bb9\uff0c\u5e72\u4ec0\u4e48\u7528\u7684\u5927\u5bb6\u53ef\u4ee5\u8111\u8865\u4e00\u4e0b\u3002\u4e3b\u8981\u662f\u5973\u751f\uff0c\u5e94\u8be5\u53ef\u4ee5\u4e00\u770b\u5c31\u660e\u767d\u662f\u600e\u4e48\u56de\u4e8b\u3002\u4ece\u8bba\u575b\u91cc\u770b\u5230\u7684\uff0c\u4f46\u8fd8\u662f\u4e0d\u4f1a\u505aGUI\uff0c\u53ea\u597d\u62ffCLI\u6765\u7cca\u5f04\u4e8b\u4e86\u3002<\/p>\n<p>\u8fd8\u5ff5Fortran\u7684switch\u8bed\u53e5\u7684\u7b80\u7ec3\uff0c\u5176\u5b9eC\u5e94\u8be5\u53ef\u4ee5\u66f4\u7b80\u5355\u7684\u5904\u7406\u65e5\u671f\u7684\uff0cdifftime()\uff0c\u6240\u4ee5\u8bf4C\u662f\u767d\u5b66\u4e86\u3002<\/p>\n<p>PS\uff1a\u5410\u69fd\u4e00\u4e0b\u77e5\u66f4\u9e1f\u4e3b\u9898\u7684\u9884\u8bfb\u529f\u80fd\u4e0d\u7ed9\u529b\u554a\uff0cmore\u6807\u7b7e\u4e0d\u80fd\u7528\uff0c\u9884\u8bfb\u6ca1\u6709\u6bb5\u843d\u683c\u5f0f\uff0c\u6bcf\u56de\u90fd\u8981\u591a\u6253\u597d\u591a\u7684\u5b57\uff0c\u5176\u5b9e\u90fd\u53ef\u4ee5\u7701\u7565\u7684\u4e1c\u897f\u3002\u61d2\u5f97\u6539\u8fd9\u4e9b\u4e1c\u897f\u4e86\uff0c\u5c06\u5c31\u80fd\u6709\u5c31\u662f\u4e86\u3002\u60b2\u4e86\u4e2a\u50ac\u7684\u77e5\u66f4\u9e1f\u3002<\/p>\n<p>PS\uff1a\u4e2d\u56fd\u7535\u4fe1\u597d\u5751\u7239\u554a\uff0c\u52a0\u8f7d\u901f\u5ea6\u597d\u6162\uff0c\u6539\u4e86Hosts\u8fd8\u662f\u4e0d\u884c\uff0c\u8fd8\u4e0d\u5982ssh\u5feb\u5462\u3002<\/p>\n<p>\u4ee3\u7801\uff1a<\/p>\n<p><code lang=\"C\">\/*========================================================================<br \/>\n#   FileName: main.c<br \/>\n#     Author: hsyyf<br \/>\n#      Email: 931107419@qq.com<br \/>\n#   HomePage: http:\/\/www.hsyyf.me<br \/>\n# LastChange: 2012-07-17 23:38:23<br \/>\n========================================================================*\/<br \/>\n#include<stdio.h><br \/>\n#include <stdlib.h><br \/>\nint Clc(int m,int d,int old_m,int old_d);<br \/>\nint month(int m);<br \/>\nint main()<br \/>\n{<br \/>\n int m,d,old_m,old_d;<br \/>\n int new_m,new_d;<br \/>\n int Days;<br \/>\n printf(\"\u4e0a\u6b21\u7684\u6708\u4efd\uff1a\");<br \/>\n scanf(\"%d\",&m);<br \/>\n printf(\"\u4e0a\u6b21\u7684\u65e5\u5b50\uff1a\");<br \/>\n scanf(\"%d\",&d);<br \/>\n printf(\"\u518d\u4e0a\u6b21\u7684\u6708\u4efd\uff1a\");<br \/>\n scanf(\"%d\",&old_m);<br \/>\n printf(\"\u518d\u4e0a\u6b21\u7684\u65e5\u5b50\uff1a\");<br \/>\n scanf(\"%d\",&old_d);<br \/>\n Days=Clc(m,d,old_m,old_d);<br \/>\n new_d=d+Days;<br \/>\n new_m=m;<br \/>\n while(new_d>=month(new_m))<br \/>\n {<br \/>\n new_m=new_m+1;<br \/>\n new_d=new_d-month(new_m);<br \/>\n }<br \/>\n printf(\"\u4e0b\u6b21\u65f6\u95f4\u4e3a%d\u6708%d\u65e5\u3002\\n\",new_m,new_d);<br \/>\n printf(\"Power By 931107419@qq.com\\n\");<br \/>\n system(\"pause\");<br \/>\n return 0;<br \/>\n}<\/p>\n<p>int month(int call_m)<br \/>\n{<br \/>\n switch(call_m)<br \/>\n {<br \/>\n case(1):<br \/>\n case(3):<br \/>\n case(5):<br \/>\n case(7):<br \/>\n case(8):<br \/>\n case(10):<br \/>\n case(12):<br \/>\n return 31;break;<br \/>\n case(2):<br \/>\n return 28;break;<br \/>\n default:<br \/>\n return 30;break;<br \/>\n }<br \/>\n}<br \/>\nint Clc(int m,int d,int old_m,int old_d)<br \/>\n{<br \/>\n int day,months;<br \/>\n day=month(old_m)-old_d+d;<br \/>\n if(old_m==m)<br \/>\n {<br \/>\n day-=month(m);<br \/>\n }<br \/>\n months=m;<br \/>\n while(months-1>old_m)<br \/>\n {<br \/>\n day+=month(months);<br \/>\n months-=1;<br \/>\n }<br \/>\n return day;<br \/>\n}<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8bf4\u662fYD\uff0c\u4e3b\u8981\u662f\u770b\u5e72\u4ec0\u4e48\u7528\u4e86\u3002\u7cbe\u7b80\u4e86\u4e00\u4e0bprintf\u5185\u7684\u5185\u5bb9\uff0c\u5e72\u4ec0\u4e48\u7528\u7684\u5927\u5bb6\u53ef\u4ee5\u8111\u8865\u4e00\u4e0b\u3002\u4e3b\u8981\u662f\u5973\u751f\uff0c\u5e94\u8be5\u53ef\u4ee5 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[16],"tags":[66],"class_list":["post-963","post","type-post","status-publish","format-standard","hentry","category-16","tag-c"],"_links":{"self":[{"href":"https:\/\/www.hsyyf.me\/index.php?rest_route=\/wp\/v2\/posts\/963","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hsyyf.me\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hsyyf.me\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hsyyf.me\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hsyyf.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=963"}],"version-history":[{"count":0,"href":"https:\/\/www.hsyyf.me\/index.php?rest_route=\/wp\/v2\/posts\/963\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.hsyyf.me\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=963"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hsyyf.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=963"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hsyyf.me\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=963"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}