【单选题】【消耗次数:1】
设执行以下程序段时依次输入1、3、5,执行结果为______。 ??? Dim a(4) As Integer, b(4) As Integer ??? For K = 0 To 2 ??????? a(K + 1) = Val(InputBox(请输入数据)) ??????? b(3 - K) = a(K + 1) ??? Next K ??? Print b(K)
0
3
5
1
参考答案:
复制
纠错
相关题目
【简答题】 已知函数 。下面是实现计算该函数的程序,请填空完成以下程序。 Private Sub Command1_Click() Dim k As Integer, i As Integer, s As Long n = 5 : k = 1 For i = 1 To n s = s +[填空] Next i Print s End Sub Function pow(a As Integer, b As Integer) As Long Dim i As Integer, t As Long t = 1 For i = 1 To a [填空] Next i pow = t End Function
【单选题】 以下程序段运行后sum的值为()。intk=0,sum=0;inta[3][4]={1,2,3,4,5,6,7,8,9,10,11,12};for(;kk++)sum+=a[k][k+1];
①  9
②  18
③  19
④  21
【单选题】 有以下程序,执行后输出结果是() main( ) { int m[][3]={1,4,7,2,5,8,3,6,9}; int i,j,k=2; for(i=0;i { printf(%d ,m[k][i]); } }
①  4 5 6
②  2 5 8
③  3 6 9
④  7 8 9
【单选题】 以下程序的运行结果是:main){intk=4,a=3,b=2,c=;printf\n%d\n,k<a?k:c<b?c:a);}
①  4
②  3
③  2
④  1
【单选题】 若有定义语句:int k1=10,k2=20;,执行表达式(k1=k1k2)(k2=k2k1)后,k1和k2的值分别为()。
①  0和1
②  0和20
③  10和1
④  10和20
【判断题】 已知X只取-1,1,5,相应的概率为1/(2k),1/(4k),1/(8k)则常数k=1.
①  正确
②  错误
【单选题】 若有定义:inta=3,b=2,c=1,k;则表达式k=ac的值是()。
①  0
②  1
③  2
④  3
【判断题】 已知X只取-1,1,5,相应的概率为1/(2k),1/(4k),1/(8k)则常数k=7/8.
①  正确
②  错误
【单选题】 以下程序的运行结果是( )。 Main() {int k=4,a=3,b=2,c=; printf(\n %d\n,ka?k:cb?c:a); }
①  4
②  3
③  2
④  1
【单选题】 若变量已正确定义,和语句“if(a&gt;b)k=0;else k=1;”等价的是()
①  k=(a;b)?1:0;
②  k=a;b;
③  k=a;=b;
④  a;=b?0:1;
随机题目
【单选题】 They can’t leave until they _______ their work .
①  did
②  are doing
③  have done
④  his done
【单选题】 As I will be away for at least a year,Id appreciate________from you now and then so that I can know how everyone is getting along.
①  having heard
②  to hear
③  hearing
④  being heard
【单选题】 The dog,________,will be made a good watchdog.
①  to train properly
②  being trained properly
③  properly to train
④  trained properly
【单选题】 What ______if I drink this ?
①  happens
②  is happening
③  will happen
④  is happened
【单选题】 —Have you searched the sitting room for your key? —No. It was in the study________ I remember I left it.
①  which
②  where
③  that
④  as
【单选题】 The monument(里程碑) was built in honor of the explorer who was believed________the river.
①  to have discovered
②  to have been discovered
③  to discover
④  having been discovered
【单选题】 Theearthisabout_______asthemoon.
①  as fiftytimebig
②  fiftytimesasbig
③  asbigfiftytimes
④  fiftyastimesbig
【单选题】 The English is GREAT campaign is intended to recognize outstanding individuals ______,every day and in many different ways,share their passion for the English language.
①  when
②  which
③  who
④  where
【单选题】 Thejacketwasso______ thathedecidedtobuyit.
①  much
②  little
③  expensive
④  cheap
【单选题】 The bridge which ________last year looks really beautiful.
①  was built
②  built
③  was set up
④  had been built