更多“问答题What would be the next number in this series? 0… 5… 1… 4… 2… ?  2 ,3 , -1 , 10”相关问题
  • 第1题:

    (26)编写下列事件过程和函数过程Private Sub Command1_Click() Dim num(1 TO 6)As Single Num(1)=103:Num(2)=190:Num(3)=0: Num(4)=32:Num(5)=-56:Num(6)=100: Print Print p2(6,num()) End Sub Private Function p2(By Val n Integer,number()As Single)As Integer P2=number(1) For j=2 To n If number(j)<p2 Then p2=number(j) Next j End Function 程序运行后,在窗体上输出 A.-56 B.0 C.103 D.190


    正确答案:A
    【解析】分析程序,函数p2的作用是找出指定数组中最小的数并返回。p2函数指定第1个参数以传值的形式传递,第2个参数以传地址的形式传递。因此,在命令按钮单击事件中调用函数p2时,参数6是以传值的形式传给形参n,数组num以传地址的形式传给形参number。所以题中整个程序要实现的功能是找出数组num中最小的数并输出,因此最后输出-56。

  • 第2题:

    设有如下定义和声明:struct3{inta;structs*next};structsx[4]={1,&x[1],3,& x[2],5,&

    设有如下定义和声明: struct 3 {int a; struct s *next }; struct s x[4]={1,&x[1],3,& x[2],5,&x[3],7,'\0'),*t; t=&x[0]; 则下列表达式值为2的是( )

    A.++t->a

    B.(*t).a++

    C.t->a++

    D.t++->a


    正确答案:A

  • 第3题:

    下列程序段的执行结果为_______。 A=0:B=0 For I=-1 To -2 Step -1 For J=1 To 2 B=B+1 Next J A=A+1 Next I Print A;B

    A.2 4

    B.-2 2

    C.4 2

    D.2 3


    正确答案:A
    解析:For…Next循环跟踪程序:内循环的循环体执行了四次,外循环的循环体执行了两次,故A=2,B=4。

  • 第4题:

    执行下列程序段后,输出的结果是 For k1 = 0 To 4 y =20 For k2 = 0 To 3 y=10 For 16 = 0 To 2 y=y+10 Next Next Next Print y

    A.90

    B.60

    C.40

    D.10


    正确答案:C
    解析:这是一个3重循环嵌套的程序。多重For循环的执行过程是:外层循环的循环控制变量每取1个值,内循环的循环控制变量要取遍所有的值。这个程序中最外两层循环的最后1次循环执行时k1=4, k2=3,都要再执行1次y=10,不管y以前取得何值,y都要重新取得初值10,这时再执行1次内循环。内层循环体要执行3次,即加3次10。y最终的值是40。

  • 第5题:

    执行下列程序段后,输出的结果是( )。 Forkl=0 To 4 y=20 For k2=0 To 3 y=10 Fork3=0 To 2 y=y+10 Next k3 Next k2 Next k1 Print y

    A.90

    B.60

    C.40

    D.10


    正确答案:C

  • 第6题:

    在窗体上画1个命令按钮,并编写如下事件过程: Private Sub Command1 Click( ) Dim a(3,3) For m=1 To 3 For n=1 To 3 If n=m or n=4—m Then a(m.n)=m+n Else a(m,n)=0 End If Print a(m,n); Next n Print Next m End Sub 运行程序,单击命令按钮,窗体上显示的内容为( )。

    A.2 0 0 0 4 0 0 0 6

    B.2 0 4 0 4 0 4 0 6

    C.2 3 0 3 4 0 0 0 6

    D.2 0 0 0 4 5 0 5 6


    正确答案:B
    B。【解析】本题考查了嵌套的For循环,答案为B选项。

  • 第7题:

    设有如下程序: Private Sub Commandl Click() Dimsum As Double,x As D0uble sum=0 n=0 For i=1 To 5 x=n/i n=n+1 sum=sum+x Next End Sub 该程序通过For循环计算一个表达式的值,这个表达式是______。

    A.1+1/2+2/3+3/4+4/5

    B.1+1/2+2/3+3/4

    C.1/2+2/3+3/4+4/5

    D.1+1/2+1/3+1/4+1/5


    正确答案:C
    解析:本题考查循环语句,其过程如下:i=1时,x=0/1=0,n=0+1=1,sum=0+0;i=2时,x=1/2,n=1+1=2,sum=o+1/2;i=3时,x=2/3,n=2十1=3,sum=O+1/2+2/3;i=4时,x=3/4,n=3+1=4,sum=O+1/2+2/3+3/4;i=5时,x=4/5,n=4+1=5,sum=O+1/2+2/3+3/4+4/5。

  • 第8题:

    When building a NIC team (virtual port channel) between a host and a pair of Cisco Nexus 5000 Series Switches that will carry FCoE traffic, what is the maximum number of physical links that can exist in the team?()

    • A、 1
    • B、 2
    • C、 4
    • D、 5
    • E、 16

    正确答案:B

  • 第9题:

    问答题
    What is the next number in the following sequence?  1 - 2 - 3 - 5 - 8 - 13

    正确答案: 21
    解析:
    序列中每一个数字都是前两个数字的和,最后的两个数是8和13,因此下一个数就是8与13的和。

  • 第10题:

    单选题
    If 5/8 of a number is 20, what is 1/8 of the number?
    A

    1/2

    B

    4

    C

    8

    D

    16

    E

    32


    正确答案: E
    解析:
    假设那个数字为n,可得出5n/8 =20,n = 32,所以1/8 (32)= 4。

  • 第11题:

    问答题
    Which number should come next in this series?  3, 5, 8, 13, 21, ?

    正确答案: 34
    解析:
    从第三个数字开始,每个数字是前两个之和。

  • 第12题:

    问答题
    4 9 6 2 3 4 7 8 2 1 9 6 4 3 2  Multiply by 7 the number of odd numbers which are immediately followed by an even number in the list above. What is the answer?

    正确答案: 35
    解析: 紧跟在偶数后面的奇数有5个,分别是9、3、7、9、3。故5乘以7得35。odd number奇数。even number偶数。

  • 第13题:

    (24)有下列程序段,其输出结果是 a=0:b=0 For i=-1 To -2 Step -1 For j=1 To 2 b=b+1 Next j a=a+1 Next i Print a;bA.2 3 B.-2 2 C.4 2 D.2 4


    正确答案:D
    【解析】这个双重For循环中,外层的For循环循环次数是两次,计算变量a的值;内层For循环每次执行循环次数也是2次,计算变量b的值。执行过程为:①当a=0,b=0时,语句b=b+1执行两次,结果为2,a=a+1=1。②当a=1,b=2时,语句b=b+1执行两次,结果为4,a=a+1=2。因此最后计算结果为a=2,b=4。

  • 第14题:

    设有如下程序: Private Sub Command1_Click() Dim sum As Double,x As Double sum=0 n=0 For i=1 To 5 x=n/i n=n+1 sum=sum+x Next End Sub 该程序通过For循环计算一个表达式的值,这个表达式是 ______。

    A.1+1/2+2/3/4+4/5

    B.1+1/2+2/3+3/4

    C.1/2+2/3+3/4+4/5

    D.1+1/2+1/3+1/4+1/5


    正确答案:C
    解析:本题考查循环语句,其过程如下:
      i=1时,x=0/1=0,n=0+1=1,sum=0+0;
      i=2时,x=1/2,n=1+1=2,sum=0+1/2;
      i=3时,x=2/3,n=2+1=3,sum=0+1/2+2/3;
      i=4时,x=3/4,n=3+1=4,sum=0+1/2+2/3+3/4;
      i=5时,x=4/5,n=4+1=5,sum=0+1/2+2/3+3/4+4/5。

  • 第15题:

    单击一次命令按钮之后,下更程序代码的执行结果为______ 。 Public Sub Proc(a() As Integer) Static i As Integer Do a(i) = a(i) + a(i + 1) i=i+1 Loop While i < 2 End Sub Private Sub Command1_Cliek() Dim m As Integer Dim i As Integer Dim x(10) As Integer For i = 0 To 4 x(i) = i + 1 Next i For i = 1 To 2 Call Proc (x) Next i For i = 0 To 4 Print x(i); Next i End Sub

    A.3 4 7 5 6

    B.3 5 7 4 5

    C.1 2 3 4 5

    D.1 2 3 5 7


    正确答案:B

  • 第16题:

    单击一次命令按钮后,下列程序的执行结果为

    Private Sub Command1_Click()

    Dim m As Integer,I As Integer,x(10) As Integer

    For I=0 To 4:x(I)=I+1:Next I

    For I=1 TO 2:Call Prioc(x):Next I

    For I=0 TO 3:Print x(I);:Next I

    End Sub

    Private Sub Prioc(a()As Integer)

    Static I As Integer

    Do

    a(I)=a(I)+a(I+1)

    I=I+1

    Loop While I<2

    End Sub

    A.3 4 7 5

    B.3 5 7 4

    C.1 2 3 4

    D.1 2 3 5


    正确答案:B
    解析:数组也可以作为函数或过程的参数,使用方法是直接使用数组名加括号也可以直接使用数组名,例如Proc(x)和Proc(x())都正确。

  • 第17题:

    以下程序段的执行结果是 ______。 Dim A(3, 3) For m = 1 To 3 For n = 1 To 3 If n = m Or n = 3 - m + 1 Then A(m, n) =m + n Else A(m, n) = 0 End If Next n Next m For m = 1 To 3 For n = 1 To 3 Print A(m, n); Next n Print Next m

    A. 1 1 1 1 1 1 1 1 1

    B.2 0 4 0 4 0 4 0 6

    C.0 0 0 0 0 0 0 0 0

    D.1 0 1 0 1 0 1 0 1


    正确答案:B

  • 第18题:

    编写下列事件过程和函数过程:

    Private Sub Commandl Click()

    Dim num(1 To 6)As Single

    num(1)=103:num(2)=190:num(3)=0

    num(4)=32:num(5)=-56:num(6)=100

    Print

    Print p2(6,num())

    End Sub

    Private Function p2(ByVal n As Integer,number()As Single)As Integer

    p2=number(1)

    For j=2 To n

    If number(j)<p2 Then p2=number(j)

    Next j

    End Function

    程序运行后,在窗体上输出( )。

    A.-56

    B.0

    C.103

    D.190


    正确答案:A
    解析:分析程序,函数p2的作用是找出指定数组中最小的数并返回。p2函数指定第1个参数以传值的形式传递,第2个参数以传地址的形式传递。因此,在命令按钮单击事件中调用函数p2时,参数6是以传值的形式传给形参n,数组num以传地址的形式传给形参number。所以题中整个程序要实现的功能是找出数组num中最小的数并输出,因此最后输出-56。

  • 第19题:

    编写如下事件过程和函数过程: Private Sub Command1_Click() Dim num(1 To 6)As Single num(1)=103:num(2)=190:num(3)=0 num(4)=32:num(5)=-56:num(6)=100 Print Print p2(6,num()) End Sub Private Function p2(By Val n As Integer, number() As Single) As Integer p2=number(1) For j=2 To n If number(j)<p2 Then p2=number(j) Next j End Function 程序运行后,在窗体上输出( )。

    A.-56

    B.0

    C.103

    D.190


    正确答案:A
    解析:分析程序,函数p2的作用是找出指定数组中最小的数并返回。p2函数指定第1个参数以传值的形式传递,第2个参数以传地址的形式传递。因此,在命令按钮单击事件中调用函数p2时,参数6是以传值的形式传给形参n,数组num以传地址的形式传给形参number。所以题中整个程序要实现的功能是找出数组num中最小的数并输出,因此最后输出“-56”。

  • 第20题:

    What is the maximum number of NET addresses supported on a virtual router?()

    • A、0
    • B、1
    • C、2
    • D、3

    正确答案:D

  • 第21题:

    单选题
    At a college basketball game, the ratio of the number of freshmen who attended to the number of juniors who attended is 3:4. The ratio of the number of juniors who attended to the number of seniors who attended is 5:6. What is the ratio of the number of freshmen to the number of seniors who attended the basketball game?
    A

    5:8

    B

    3:4

    C

    3:5

    D

    2:3

    E

    1:3


    正确答案: D
    解析:
    Freshmen to Juniors is 3:4. and Juniors to Seniors is 5:6. Since the least common multiple of 4 and 5 is 20. multiply the terms of the first ratio by 5 and the second one by 4. Then the ratio of freshmen to juniors to seniors is l5:20:24. Therefore, 15:24 is the ratio of freshmen to seniors. 15:24=15/24=5/8

  • 第22题:

    问答题
    You are given a series of numbers. Your task is to see how they form a relationship with each other. You have to choose the number that would go next in the series.1, 3, 6, 10

    正确答案: 15
    解析:
    1+2=3;3+3=6;6+4=10;10+5=15;第二个加数从2依此递增得到下一个序列值。

  • 第23题:

    问答题
    Fill in the missing number:  0, 1, 1, 2, 3, 5, 8, 13,____, 34, 55

    正确答案: 21
    解析:
    每个数字是前两个数字之和。