So in general, when you're running command line programs, they can take input or arguments or parameters or switches or flags.
一般而言,当你运行命令行程序时,可以把把这些当做输入,像什么参数啊,或开关啊,或标志啊等等。
I can have functions with no parameters, that's fine, I will still need the open and close paren there to identify that I have no parameters.
我每次都需要进行输入码?,函数可以没有参数,我依然需要前后括号,来定义我没与参数。
You have to be ever so explicit as to what data type your actually passing in.
你必须很清楚,你们输入的参数是什么类型的。
It then should take an argument or parameter if you want your function to take input.
然后它必须携带一个参数或参量,如果你想要你的函数获得一个输入。
An argument or a parameter is an input to a function.
参数或参量是一个函数的输入。
Now this happens to be what we would call a linear process, because the number of times I go around the loop is directly related to the size of the argument. If I double 2 the argument, I'm going to double the number of times I go around the loop. If I increase it by five, 5 I'm going to increase by five the number of times I go around the loop.
这恰好是我们会成为,线性复杂度程序的一个例子,因为我要执行循环的次数是,和输入的参数的大小直接相关的,如果我将这个参数乘以,那么我就要将进行循环的次数也乘以2了,如果我把参数加上,那么循环的次数也要加上5了。
The parentheses to pass in inputs or arguments to functions.
圆括号是用来传函数的,输入或参数的。
So before we use printf, a function, and we passed in one input and input henceforth we're gonna call arguments or parameters.
我们在使用printf函数时,先放进去一个输入,之后的输入我们就要,调用参数了。
But if it does take input, you have to provide it in the form of arguments or parameters, like print F takes, generally, inside of those parentheses.
但是如果它获得了输入,你需要为它提供相应格式的,参数或参量,像printf的输入,一般地,在这些圆括号里。
First of all, two parameters. It's OK. All it says is, when I call this, I need to pass in two parameters for this to work. All right? Now, if I want to use that, I'm going to use a second piece of code here, called Barnyard. I'm going Barnyard to read in a couple of values, convert them into integers, and then I'm going to use solve to get a solution out.
注意我得到了什么,第一,两个参数,它的意思就是我调用这个函数,我得给它输入两个参数,明白了吗?,现在如果我要使用它我得用,这里的第二段代码,也叫,我将读入一组值,将它们转化为整型,然后我会用solve得到一个解决方案。
应用推荐