{"id":96616,"date":"2020-04-21T01:51:11","date_gmt":"2020-04-20T17:51:11","guid":{"rendered":"http:\/\/4563.org\/?p=96616"},"modified":"2020-04-21T01:51:11","modified_gmt":"2020-04-20T17:51:11","slug":"%e5%9c%a8-codeblocks-%e4%b8%ad-c-%e8%af%ad%e8%a8%80%e7%9a%84%e7%a8%8b%e5%ba%8f%e8%bf%90%e8%a1%8c%e7%bb%93%e6%9e%9c%e6%9c%89%e8%af%af%ef%bc%8c%e5%a6%82%e4%bd%95%e5%a4%84%e7%90%86%ef%bc%9f","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=96616","title":{"rendered":"\u5728 Code::Blocks \u4e2d c \u8bed\u8a00\u7684\u7a0b\u5e8f\u8fd0\u884c\u7ed3\u679c\u6709\u8bef\uff0c\u5982\u4f55\u5904\u7406\uff1f"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u5728 Code::Blocks \u4e2d c \u8bed\u8a00\u7684\u7a0b\u5e8f\u8fd0\u884c\u7ed3\u679c\u6709\u8bef\uff0c\u5982\u4f55\u5904\u7406\uff1f               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : l9mhd <\/span>  <span><i><\/i> 52<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<h2>\u95ee\u9898<\/h2>\n<p>\u4ee3\u7801 1<\/p>\n<pre><code>#include&lt;stdio.h&gt; int main(){  double a,b;   a = 0.15;  b = (int)\uff08 a*10+0.5 \uff09;  printf(\"%.1f\",b);  return 0; } <\/code><\/pre>\n<p>\u8f93\u51fa <code>1.0<\/code><\/p>\n<p>\u4ee3\u7801 2<\/p>\n<pre><code>#include&lt;stdio.h&gt; int main(){  double a,b;   a = 0.15;  b = a*10+0.5;     b = (int)b;  printf(\"%.1f\",b);  return 0; } <\/code><\/pre>\n<p>\u8f93\u51fa <code>2.0<\/code><\/p>\n<p>\u4e4b\u540e\u7528\u7ebf\u4e0a\u7f16\u8bd1\u5668\uff08 https:\/\/rextester.com\/l\/c_online_compiler_gcc \uff09 \u6d4b\u8bd5\uff0c\u4e24\u6bb5\u4ee3\u7801\u7ed3\u679c\u4e00\u81f4\uff0c\u90fd\u662f <code>2.0<\/code> \u3002<\/p>\n<h2>\u5c1d\u8bd5\u89e3\u51b3<\/h2>\n<p>\u4ece\u5b98\u7f51\u4e2d\u91cd\u65b0\u4e0b\u8f7d\u5b89\u88c5\uff0c\u4f46\u662f\u95ee\u9898\u6ca1\u6709\u89e3\u51b3\uff0c\u8fd0\u884c\u7ed3\u679c\u4ecd\u7136\u4e0d\u4e00\u81f4\u3002<\/p>\n<ul>\n<li>\u8fd9\u79cd\u60c5\u51b5\u662f\u4ec0\u4e48\u539f\u56e0\u5bfc\u81f4\u7684\uff1f<\/li>\n<li>\u6211\u53ef\u4ee5\u505a\u4e9b\u4ec0\u4e48\uff1f<\/li>\n<\/ul>\n<p>\u8c22\u8c22\uff01<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>9<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"876658\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : des <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u53ef\u4ee5\u628a\u6709\u95ee\u9898\u7684\u7a0b\u5e8f\u53cd\u6c47\u7f16\u4e86\u770b\u770b                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"876659\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : kokutou <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4f60\u53ef\u4ee5<br \/>1 \u4ee5\u540e\u90fd\u7528\u4ee3\u7801 2 \u7684\u5199\u6cd5\u3002<br \/>2 \u4ee5\u540e\u90fd\u4e0d\u8981\u5f3a\u5236\u8f6c\u7c7b\u578b\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"876660\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : l9mhd <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @des \u60a8\u597d\uff01\u6211\u628a\u4ee3\u7801 1 \u53cd\u7f16\u8bd1\u51fa\u6765\u7684 txt \u590d\u5236\u5230\u9644\u8a00\u4e0a\u4e86\u3002<br \/>\u5c0f\u7ea2\u70b9\u5728\u5f00\u5934\u548c\u7ed3\u5c3e\uff0c\u7136\u540e\u7f16\u8bd1\u7684\uff0c\u4e0d\u8fc7\u6211\u4e0d\u660e\u767d\u8fd9\u4e9b\u662f\u4ec0\u4e48\u610f\u601d\uff0c\u80fd\u9ebb\u70e6\u60a8\u770b\u4e00\u770b\u5417\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"876661\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : l9mhd <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @kokutou \u6211\u76ee\u524d\u6b63\u5728\u5b66\u4e60\u7f16\u7a0b\uff0c\u6211\u4e0d\u592a\u786e\u5b9a\u8fd9\u662f\u4e0d\u662f\u8f6f\u4ef6\u7684\u95ee\u9898\uff0c\u6709\u70b9\u62c5\u5fc3\u5728\u4ee3\u7801\u4e2d\u51fa\u73b0\u4e86\u8fd9\u6837\u7684\u60c5\u51b5\u4ee5\u540e\u4f1a\u96be\u4ee5\u8fa8\u522b\u51fa\u6765\u3002<br \/>\u5173\u4e8e\u5f3a\u5236\u8f6c\u7c7b\u578b\uff0c\u8fd9\u6bb5\u4ee3\u7801\uff0ca \u8d4b\u503c\u8f93\u5165\u7684\u5185\u5bb9\uff0cb \u518d\u9664\u4ee5 10\uff0c\u7528\u4e8e\u4fdd\u7559\u5c0f\u6570\u540e\u4e00\u4f4d\uff08\u56db\u820d\u4e94\u5165\uff09\uff0c\u5728\u8fd9\u91cc\u5f3a\u5236\u8f6c\u7c7b\u578b\u662f\u7528\u4e8e\u7701\u7565\u53bb\u5c0f\u6570\u90e8\u5206\u7684\u503c\uff0c\u6211\u4e0d\u77e5\u9053\u6709\u6ca1\u6709\u522b\u7684\u5b9e\u73b0\u65b9\u5f0f\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"876662\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Cielsky <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             codeblock \u7f16\u8bd1\u5668\u7684\u95ee\u9898\u5427\uff0c\u4f30\u8ba1\u662f\u9057\u7559 bug<br \/>\u8c03\u8bd5\u770b\u4e86\u4e0b<br \/>(int)(a~)\u4e3a 2<br \/>\u5728\u5411 double \u7c7b\u578b\u8f6c\u6362\u7684\u65f6\u5019\u7ed3\u679c\u9519\u4e86<br \/>\u5176\u4ed6\u7f16\u8bd1\u5668\u8bd5\u4e86\u4e0b\u6ca1\u9047\u5230\u8fd9\u4e2a\u95ee\u9898                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"876663\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : kokutou <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @l9mhd #4 <\/p>\n<p>https:\/\/visualstudio.microsoft.com\/vs\/community\/<\/p>\n<p>\u5982\u679c\u8981\u5b66\u3002\u3002\u5efa\u8bae\u7528 vs<br \/>\u5982\u679c\u4f60\u80fd\u641e\u5b9a\u79d1\u5b66\u4e0a\u7f51\uff0c\u90a3\u5efa\u8bae msys2+vscode                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"876664\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : l9mhd <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @Cielsky \u597d\u7684\uff0c\u591a\u8c22\uff01                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"876665\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : l9mhd <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @kokutou \u6211\u4e0b\u8f7d\u4e86\uff0c\u4f46\u662f\u6211\u5728\u8bed\u8a00\u5217\u8868\u91cc\u6ca1\u627e\u5230 c \uff08\u6211\u73b0\u5728\u53ea\u5b66\u4e86 c \uff09\uff0c\u611f\u89c9\u8fd8\u8981\u4e00\u6bb5\u65f6\u95f4\u5b66\u4e60\u600e\u4e48\u7528                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"876666\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : mxalbert1996 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @l9mhd \u4f60\u81f3\u5c11\u5e94\u8be5\u77e5\u9053 C++\u5b8c\u5168\u517c\u5bb9 C \u5427                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u5728 Code::Blocks \u4e2d &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/96616"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=96616"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/96616\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=96616"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=96616"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=96616"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}