Right.? I'm going to set up a variable to say, none what's the answer I want to return, is it there or not. Initially it's got that funny value none.
看我要找的答案在不在数组里面,初始化为,然后建立一个索引。
I set up a variable here, called input OK.
我会在这里建立个变量。
Just to remind you what it does, we bound x to some value, we set up an initial variable called ANS or answer, answer and then we run through a little loop.
记住你要做些什么,我们给x赋一个值,我们建立一个初始变量,命名为ANS或者。
And that shows you one other nice little thing we want to do, which is if I look in this code notice I set up a variable up here called false Solution Found, initially bound to false.
这显示了我们想要做的另一件事,那就是我在这段代码中设置了一个,名为Solution,Found的变量,初始值设为。
应用推荐