命名空间;
Int = 1;
cout <“enter the number to be倍增:“<值;
CIN <;
< < <成本”的双重doublenumber is“< <值(A);
返回0;
}
用户输入是然后显示along with the result。
mihirichathurika
February 2013年7,AT 1:59 AM日志in to reply
谢谢你这么多。你解释它简单
jupoopiter
March 5,2013年在3:30 AM log in to reply
精湛的教程!
我想我们测验误差问题5年因为我们线13我在这样的功能:doublenumber()rather than这样:doublenumber(X)。
抱歉for the愚蠢的问题,但可以有人解释为什么X needs to be there?
zingmars
August 19,2013年在5:20 AM日志in to reply
你如何定义函数doublenumber吗?这是doublenumber(int x){ },right?
see,the int x方面is the输入part of the函数列表–你所有的事情,go into the函数。你不能指定特定变量的名字,尽管实际上,你只能指定the name that will be used in the function(可以是任何你想要的,那就是你refer to the inputinside the function),and the类型(int,浮,字符串,等等)。
所以,原因是doublenumber(X),是因为你不得不提到这一doublenumber变量。这样你也可以叫它像doublenumber(Y)和doublenumber(Z),and it will双变量Y和Z。
slyfvro
March 14,2013年在6:45 AM日志in to reply
这是因为当调用功能,你也需要指定其正确的参数。since the doublenumber(int x)function is not在int int().the手(手)does not know the int x参数甚至是否存在。所以你需要告诉int手,doublenumber(int x)是一个功能以及“int x”有其参数。
dj51401
March 29,2013 at 7:14 PM日志in to reply
这是可怕的,我只有11岁,我发现这很容易!Thank you for the教程