最新回答 / Power3
#include <stdio.h>int main(){ // int age=/* 不知道你是想定义还是赋值啊,先定义的话,还得赋值int Age;Age=18;*/int Age;Age=18; printf("今年我已经太老了,我都TMD%d了\n",Age);return 0;}
2015-02-25
最新回答 / 贱e恛忆
你的所提的问题的原因是在double money()这个函数里,当天每进一次double money()函数就会printf();输出一遍,加上你在主函数里的一次输出,正好是三次;我把你程序改了一下,你可以看看#include <stdio.h>double money( int hours, double distance){ double kilePrice = 2.3;//每公里单价计费2.3元 int beginkm = 3;//包含3公里 int beginPric...
2015-02-24
最赞回答 / vLiang
<...code...>像这种需要返回计算结果的需要返回值,否则jR不能得到计算结果,如果不返回sum,sum值只在joneResult中运算<...code...>总结一句话:当你想让结果可以在自定义的函数外调用需要返回,如果只在程序内调用可以不返回,返回的类型需与程序定义的类型一致,比如 int joneResult(int x, int y, int z) 和int sum = (x+y+z)/3。
2015-02-24
最新回答 / 慕神5269880
http://www.ie.sjtu.edu.cn/?s=%E6 ... 6%62%73%63%67%68%74http://physics.scu.edu.cn/search ... 0%91%62%74%63%77%77http://www.ie.sjtu.edu.cn/?s=%E6 ... 7%76%77%74%68%75%6Chttp://physics.scu.edu.cn/search ... 3%68%63%68%63%6B%69http://www.ie.sjtu.edu.cn/?s=%E...
2015-02-24