{"rsdb":{"rid":"139950","subhead":"","postdate":"0","aid":"105629","fid":"79","uid":"1","topic":"1","content":"

\u57fa\u672c\u8f93\u5165\u8f93\u51fa\u53ca\u6d41\u7a0b\u63a7\u5236<\/strong><\/p>

\u3000\u30001.
<\/strong>\u3000\u3000#include<\/span>\n \n
\u3000\u3000main()\n
\u3000\u3000{ int a=1,b=3,c=5;\n
\u3000\u3000if (c==a+b)\n
\u3000\u3000printf(\"yes\\n\");\n
\u3000\u3000else\n
\u3000\u3000printf(\"no\\n\");\n
\u3000\u3000}\n
\u3000\u3000\u8fd0\u884c\u7ed3\u679c\u4e3a\uff1ano\n
\u3000\u3000\u8be6\u89c1\u6559\u6750p89 \u9009\u62e9\u7ed3\u6784\n
\u3000\u3000\u8be6\u89c1\u6559\u6750p91\u5173\u7cfb\u7b26\u53f7\n
\u3000\u3000\u8be6\u89c1\u9644\u5f55D p378\u7b26\u53f7\u7684\u4f18\u5148\u7ea7\n
\u3000\u3000==\u8868\u793a\u5224\u65ad\u7b26\u53f7\u4e24\u8fb9\u7684\u503c\u662f\u5426\u76f8\u7b49\uff1b=\u8868\u793a\u5c06\u7b26\u53f7\u53f3\u8fb9\u7684\u503c\u8d4b\u7ed9\u5de6\u8fb9\u7684\u53d8\u91cf\n
\u3000\u3000\u672c\u9898\u8003\u70b9\u662f\u9009\u62e9\u7ed3\u67843\u79cd\u57fa\u672c\u5f62\u5f0f\u7684\u7b2c\u4e8c\u79cd\n
\u3000\u3000\u9009\u62e9\u7ed3\u6784\u4e09\u79cd\u4e00\u822c\u5f62\u5f0f\u4e2d\u7684\u201c\u8bed\u53e5\u201d\u7686\u4e3a\u590d\u5408\u8bed\u53e5\uff0c\u590d\u5408\u8bed\u53e5\u8981\u7528{ }\u62ec\u8d77\u6765\uff0c\u53ea\u6709\u5f53\u590d\u5408\u8bed\u53e5\u4e2d\u53ea\u5305\u62ec\u4e00\u6761\u8bed\u53e5\u65f6\u53ef\u4ee5\u7701\u7565{ }\uff0c\u6b64\u9898\u5373\u5982\u6b64\uff0c\u56e0\u6b64\u4e24\u4e2aprintf\u64cd\u4f5c\u6ca1\u6709\u52a0{ }\n
\u3000\u3000\u82e5c==a+b\u6210\u7acb\uff0c\u5219\u6267\u884cprintf(\"yes\\n\");\n
\u3000\u3000\u5426\u5219\uff08\u5373c==a+b\u4e0d\u6210\u7acb\uff09\uff0c\u6267\u884cprintf(\"no\\n\");\n
\u3000\u3000+\u7684\u4f18\u5148\u7ea7\u9ad8\u4e8e==\uff0c\u56e0\u6b64\u5148\u7b97a+b,\u503c\u4e3a4\uff0c \u8868\u8fbe\u5f0f5==4\u4e0d\u6210\u7acb\uff0c\u56e0\u6b64\u6267\u884cprintf(\"no\\n\");\u5373\u8f93\u51fa\u5b57\u7b26\u4e32no\n
\u3000\u3000\n 2.<\/span>
<\/strong>\u3000\u3000#include\n <\/span>\n \n
\u3000\u3000main()\n
\u3000\u3000{ int a=12, b= -34, c=56, min=0;\n
\u3000\u3000min=a;\n
\u3000\u3000if(min>b)\n <\/span>\n
\u3000\u3000min=b;\n
\u3000\u3000if(min>c)\n <\/span>\n
\u3000\u3000min=c;\n
\u3000\u3000printf(\"min=%d\", min);\n
\u3000\u3000}\n
\u3000\u3000\u8fd0\u884c\u7ed3\u679c\u4e3a\uff1a min=-34\n
\u3000\u3000\u8be6\u89c1\u6559\u6750p89 \u9009\u62e9\u7ed3\u6784\n
\u3000\u3000\u672c\u9898\u8003\u70b9\u662f\u9009\u62e9\u7ed3\u67843\u79cd\u57fa\u672c\u5f62\u5f0f\u7684\u7b2c\u4e00\u79cd\n
\u3000\u3000\u4e00\u5171\u5305\u542b\u4e86\u4e24\u4e2a\u9009\u62e9\u7ed3\u6784\uff08\u4e24\u4e2aif\u8bed\u53e5\uff09\n
\u3000\u3000\u5b9a\u4e49\u53d8\u91cf\uff0c\u5e76\u8d4b\u503c \u6b64\u65f6a=12, b= -34, c=56, min=0\n
\u3000\u3000\u5c06a\u4e2d\u503c\u62f7\u8d1d\uff0c\u8d4b\u7ed9min\uff0c\u8986\u76d6\u4e86min\u4e2d\u76840\uff0c\u6b64\u65f6min\u4e2d\u7684\u503c\u88ab\u66f4\u65b0\u4e3a12\u3002\n
\u3000\u3000\u82e5min>b\u6210\u7acb\uff0c\u5219\u6267\u884cmin=b;\n
\u3000\u3000\u82e5min>c\u6210\u7acb\uff0c\u5219\u6267\u884cmin=c;\n
\u3000\u3000\u8f93\u51famin\u4e2d\u7684\u503c\n
\u3000\u300012\u5927\u4e8e-34,\u7b2c\u4e00\u4e2aif\u8bed\u53e5\u7684\u8868\u8fbe\u5f0f\u6210\u7acb\uff0c\u56e0\u6b64\u6267\u884cmin=b; \u6267\u884c\u540emin\u4e2d\u7684\u503c\u88ab\u66f4\u65b0\u4e3a-34.\n
\u3000\u3000-34\u5c0f\u4e8e56,\u7b2c\u4e8c\u4e2aif\u8bed\u53e5\u7684\u8868\u8fbe\u5f0f\u4e0d\u6210\u7acb\uff0c\u56e0\u6b64\u4e0d\u6267\u884cmin=c;\n
\u3000\u3000\u6700\u540e\u8f93\u51famin\u4e2d\u7684\u503c\uff0c\u4e3a-34.\n
\u3000\u3000\n 3.
<\/strong>\u3000\u3000#include\n <\/span>\n \n
\u3000\u3000main()\n
\u3000\u3000{ int x=2,y= -1,z=5;\n
\u3000\u3000if(x\n \n \u3000\u3000if(y<0)\n <\/span>\n
\u3000\u3000z=0;\n
\u3000\u3000else\n
\u3000\u3000z=z+1;\n
\u3000\u3000printf(\u201c%d\\n\u201d,z);\n
\u3000\u3000}\n
\u3000\u3000\u8fd0\u884c\u7ed3\u679c\u4e3a\uff1a5\n
\u3000\u3000\u9047\u5230\u9009\u62e9\u7ed3\u6784\uff0c\u9996\u5148\u8981\u660e\u786e\u6761\u4ef6\u8868\u8fbe\u5f0f\u6210\u7acb\u65f6\u6267\u884c\u54ea\u4e9b\u64cd\u4f5c\u3002\u672c\u9898\u4e2d\uff0c\u7b2c\u4e00\u4e2aif\u8bed\u53e5\uff0c\u5176\u540e\u7684\u590d\u5408\u8bed\u53e5\u6ca1\u6709\u5927\u62ec\u53f7{ }\uff0c\u8bf4\u660e\u590d\u5408\u8bed\u53e5\u4e2d\u53ea\u5305\u542b\u4e00\u6761\u8bed\u53e5\uff0c\u8fdb\u800c\u7701\u7565\u4e86{ }\u3002\u5185\u5c42\u7684if...else...\u662f\u9009\u62e9\u7ed3\u6784\u7684\u7b2c\u4e8c\u79cd\u57fa\u672c\u5f62\u5f0f\uff0c\u5728\u7ed3\u6784\u4e0a\u89c6\u4e3a\u4e00\u6761\u8bed\u53e5\u3002\u56e0\u6b64\u5185\u5c42\u7684if...else...\u4f5c\u4e3a\u7b2c\u4e00\u4e2aif\u8bed\u53e5\u7684\u590d\u5408\u8bed\u53e5\u3002\n
\u3000\u3000\u82e5\u8868\u8fbe\u5f0fx\n \n \u3000\u3000\u82e5y<0\uff0c\u5219\u6267\u884cz=0;\n
\u3000\u3000\u5426\u5219\uff08\u5373y>=0\uff09,\u6267\u884cz=z+1;\n
\u3000\u3000\u8f93\u51faz\n
\u3000\u30002>-1\uff0c\u8868\u8fbe\u5f0fx\n \n \u3000\u3000\u8f93\u51faz\u4e2d\u7684\u503c\u4e3a5\n
\u3000\u3000\n 4.<\/span>
<\/strong>\u3000\u3000#include\n <\/span>\n \n
\u3000\u3000main()\n
\u3000\u3000{ float a,b,c,t;\n
\u3000\u3000a=3;\n
\u3000\u3000b=7;\n
\u3000\u3000c=1;\n
\u3000\u3000if(a>b)\n
\u3000\u3000{t=a;a=b;b=t;}\n
\u3000\u3000if(a>c)\n
\u3000\u3000{t=a;a=c;c=t;}\n
\u3000\u3000if(b>c)\n
\u3000\u3000{t=b;b=c;c=t;}\n
\u3000\u3000printf(\"%5.2f,%5.2f,%5.2f\",a,b,c);\n
\u3000\u3000}\n
\u3000\u3000\u8fd0\u884c\u7ed3\u679c\u4e3a\uff1a1.00,2.00,7.00\n
\u3000\u3000\u8be6\u89c1\u6559\u6750p72\u6570\u636e\u7684\u8f93\u51fa\u5f62\u5f0f\n
\u3000\u3000\u672c\u9898\u5305\u542b\u4e863\u4e2aif\u8bed\u53e5\uff0c\u6bcf\u4e2aif\u8bed\u53e5\u540e\u7684{ }\u90fd\u4e0d\u53ef\u7701\u7565\uff0c\u56e0\u4e3a\u6bcf\u4e2a{ }\u4e2d\u90fd\u5305\u542b\u4e86\u591a\u6761\u8bed\u53e5\n
\u3000\u3000\u82e5\u8868\u8fbe\u5f0fa>b\u6210\u7acb\uff0c\u5219\u6267\u884c{t=a;a=b;b=t;}\n
\u3000\u3000\u82e5\u8868\u8fbe\u5f0fa>c\u6210\u7acb\uff0c\u5219\u6267\u884c{t=a;a=c;c=t;}\n
\u3000\u3000\u82e5\u8868\u8fbe\u5f0fb>c\u6210\u7acb\uff0c\u5219\u6267\u884c{t=b;b=c;c=t;}\n
\u3000\u3000\u8f93\u51faa,b,c\u4e2d\u7684\u503c\uff0c\u8981\u6c42\u8f93\u51fa\u7684\u6bcf\u4e2a\u6570\u636e\u5bbd\u5ea6\u4e3a5\u4e2a\u7a7a\u683c\uff0c\u5c0f\u6570\u90e8\u5206\u4fdd\u75592\u4f4d\uff0c\u6570\u636e\u53f3\u5bf9\u9f50\n
\u3000\u30003\u5c0f\u4e8e7,\u56e0\u6b64\u8868\u8fbe\u5f0fa>b\u4e0d\u6210\u7acb\uff0c\u56e0\u6b64\u4e0d\u6267\u884c{t=a;a=b;b=t;}\n
\u3000\u30003\u5927\u4e8e1\uff0c\u56e0\u6b64\u8868\u8fbe\u5f0fa>c\u6210\u7acb\uff0c\u5219\u6267\u884c{t=a;a=b;b=t;}\u3002\u7b2c\u4e00\u53e5\uff0c\u5c06a\u4e2d\u76843\u62f7\u8d1d\uff0c\u7c98\u8d34\u5230t\u4e2d\uff1b\u7b2c\u4e8c\u53e5\uff0c\u5c06c\u4e2d\u76841\u62f7\u8d1d\uff0c\u7c98\u8d34\u5230a\u4e2d\uff0c\u8986\u76d6\u6389\u5148\u524d\u76843\uff1b\u7b2c\u4e09\u53e5\u3002\u5c06t\u4e2d\u76843\u62f7\u8d1d\u5230c\u4e2d\uff0c\u8986\u76d6\u6389c\u4e2d\u5148\u524d\u76841. \u6267\u884c\u5b8c\u590d\u5408\u8bed\u53e5\u540e\u5b9e\u73b0\u4e86a,c\u5143\u7d20\u7684\u503c\u7684\u4e92\u6362\uff0ca\u4e3a1\uff0cc\u4e3a3\uff0ct\u4e3a3\uff0c\u3002\n
\u3000\u30007\u5927\u4e8ec\u4e2d\u76843\uff0c\u56e0\u6b64b>c\u6210\u7acb\uff0c\u6267\u884c\u5219\u6267\u884c{t=b;b=c;c=t;}\uff0c\u8fc7\u7a0b\u540c\u4e0a\uff0c\u6267\u884c\u540eb\u4e3a3\uff0cc\u4e3a7\uff0ct\u4e3a7\n
\u3000\u3000\u6b64\u65f6\u8f93\u51faa,b,c\u4e2d\u7684\u503c\u4e3a1.00,2.00,7.00\n
\u3000\u3000\n 5\uff0e
<\/strong>\u3000\u3000#include< stdio .h >\n
\u3000\u3000main ( )\n
\u3000\u3000{floatc=3.0 , d=4.0;\n
\u3000\u3000if ( c>d ) c=5.0;\n
\u3000\u3000else\n <\/span>\n
\u3000\u3000if ( c==d ) c=6.0;\n
\u3000\u3000elsec=7.0;\n
\u3000\u3000printf ( \u201c%.1f\\n\u201d,c ) ;\n
\u3000\u3000}\n
\u3000\u3000\u8fd0\u884c\u7ed3\u679c\u4e3a\uff1a7.0\n
\u3000\u3000\u6b64\u9898\u4e3aif...else...\u8bed\u53e5\u7684\u5d4c\u5957\uff0c\u7b2c\u4e8cif...else...\u4f5c\u4e3a\u7b2c\u4e00\u4e2aif...else...\u8bed\u53e5else\u90e8\u5206\u7684\u590d\u5408\u8bed\u53e5\u3002\n
\u3000\u3000\u82e5\u8868\u8fbe\u5f0fc>d\u6210\u7acb\uff0c\u5219\u6267\u884cc=5.0;\n
\u3000\u3000\u5426\u5219\uff08\u8868\u8fbe\u5f0fc>d\u4e0d\u6210\u7acb\uff09\n
\u3000\u3000\u82e5\u8868\u8fbe\u5f0fc==d\u6210\u7acb\uff0c\u5219\u6267\u884cc=6.0;\n
\u3000\u3000\u5426\u5219\uff0c\u6267\u884cc=7.0;\n
\u3000\u3000\u8f93\u51fac\u4e2d\u7684\u503c\n
\u3000\u30003.0\u5c0f\u4e8e4.0\uff0c\u56e0\u6b64\u8868\u8fbe\u5f0fc>d\u4e0d\u6210\u7acb\uff0c\u6267\u884c\u7b2c\u4e8c\u4e2aif\u2026else\u2026\u3002\n
\u3000\u30003.0\u4e0d\u7b49\u4e8e4.0\uff0c\u56e0\u6b64\u8868\u8fbe\u5f0fc==d\u4e0d\u6210\u7acb\uff0c\u6267\u884cc=7.0\uff0c\u5c067.0\u8d4b\u7ed9c, \u8986\u76d6\u6389c\u4e2d\u76843.0\uff0c\u6b64\u65f6c\u4e2d\u7684\u503c\u4e3a7.0\n
\u3000\u3000\u8f93\u51fa\u6b64\u65f6\u7684c\u4e2d\u7684\u503c\n <\/stdio.h>\n <\/y\u4e0d\u6210\u7acb\uff0c\u56e0\u6b64\u4e0d\u6267\u884c\u5185\u5c42\u7684if\u2026else\u2026.\u8fdb\u800cz\u4e2d\u7684\u503c\u6ca1\u6709\u88ab\u6539\u53d8\u3002
\n <\/y\u6210\u7acb\uff0c\u5219\u7ee7\u7eed\u5224\u65ad
\n <\/y)
\n <\/stdio.h>\n <\/stdio.h>\n <\/stdio.h><\/p>

\u3000\u3000\u70ed\u70b9\u63a8\u8350\uff1a<\/strong> <\/p>","orderid":"0","title":"2015\u5e74\u8ba1\u7b97\u673a\u4e8c\u7ea7C\u8bed\u8a00\u8003\u8bd5\u6a21\u62df\u9884\u6d4b\u9898\u53ca\u7b54\u6848(\u4e8c)","smalltitle":"","mid":"0","fname":"\u8ba1\u7b97\u673a\u4e8c\u7ea7\u8003\u8bd5C","special_id":"0","bak_id":"0","info":"0","hits":"341","pages":"1","comments":"0","posttime":"2015-11-10 11:26:39","list":"1447125999","username":"admin","author":"","copyfrom":"","copyfromurl":"","titlecolor":"","fonttype":"0","titleicon":"0","picurl":"http:\/\/www.cppentry.com\/upload_files\/","ispic":"0","yz":"1","yzer":"","yztime":"0","levels":"0","levelstime":"0","keywords":"2015\u5e74<\/A> \u8ba1\u7b97\u673a<\/A> \u4e8c\u7ea7<\/A> \u8bed\u8a00\u8003\u8bd5<\/A> \u6a21\u62df<\/A> \u9884\u6d4b<\/A> \u7b54\u6848<\/A>","jumpurl":"","iframeurl":"","style":"","template":"a:3:{s:4:\"head\";s:0:\"\";s:4:\"foot\";s:0:\"\";s:8:\"bencandy\";s:0:\"\";}","target":"0","ip":"14.17.22.37","lastfid":"0","money":"0","buyuser":"","passwd":"","allowdown":"","allowview":"","editer":"","edittime":"0","begintime":"0","endtime":"0","description":"2015\u5e74\u8ba1\u7b97\u673a\u4e8c\u7ea7C\u8bed\u8a00\u8003\u8bd5\u6a21\u62df\u9884\u6d4b\u9898\u53ca\u7b54\u6848(\u4e8c)","lastview":"1493060880","digg_num":"0","digg_time":"0","forbidcomment":"0","ifvote":"0","heart":"","htmlname":"","city_id":"0"},"page":"1"}