首页/ 题库 / [单选题]下列程序运行时输出的结果是( )。 Op的答案

下列程序运行时输出的结果是( )。 Option Base 1 Private Sub Form_Click() Dimx(10)As Integer,y(5) As Integer ForI=1 to 10 x(i)=10-I+1 NextI ForI=1 to 5 y(i)cx(2*-1)+x(2*I) NextI ForI=1 to 5 Printy(i); NextI

单选题
2022-02-21 16:56
A、3 7 11 45 19
B、17 13 9 5 1
C、1 3 5 7 9
D、不确定的值
查看答案

正确答案
B

试题解析

标签:
感兴趣题目
以下程序的输出结果是( )。 Option Base 1 Private Sub Command1_Click() Dim a(10),p(3) as Integer k=5 For I-1 to 10 a(i)=I Next I For j=1 to3 p(i)=a(I*j) Next j For I=l to 3 k=k+ p (I)*2 Next I Print k End Sub
下列代码运行后输出结果是( )。 Defstr C-F Private Sub Command1_Click() C$="123" D="456" Print C+D$ End Sub
下列代码运行后输出结果是 Defstr B-E Private Sub Command1_Click() B$="123" C="456" Print B+C$ End Sub
阅读程序: Option Base 1 Dim arr( )As Integer Private Sub Form_Click( ) Dim i AsInteger,j As Integer ReDim arr(3,2) For i=1 To 3 Forj=1 To 2 arr(i,j)=i*2+j Next j Next i ReDim Preserve arr(3,4) For j=3 To 4 arr(3,j)=j+9 Nextj Print arr(3,2)+arr(3,4) End Sub 程序运行后,单击窗体,输出结果为
有如下程序: Option Base 1 Pfivate Sub Form_Click() Dim arr,Sum Sum=0 arr=Array(1,3,5,7,9,11,13,15,17,19) For i=1 To 10 If arr(i)/3=arr(i)3 Then Sum=Sum+arr(i) End If Nexti print Sum End Sub 程序运行后,单击窗体,输出结果为( )。
阅读程序: Option Base 1 Private Sub Form_Click( ) Dim arr,Sum Sum=0 arr=Array(1,3,5,7,9,11,13,15,17,19) For i=1 To 10 If arr(i)/3=arr(i)3 Then Sum=Sum+arr(i) End If Next i Print Sum End Sub程序运行后,单击窗体,输出结果为
有如下程序: Option Base 1 Private Sub Form Click() Dim arr,Sum Sum =0 arr=Array(1,3,5,7,9,11,13,15,17,19) For i=1 To 10 If arr(i)/3=arr(i)3 Then Sum=Sum+arr(i) End If Next i Print Sum End Sub 程序运行后,单击窗体,输出结果为
运行以下程序后,输出的图形是 Private Sub Command1_Click( ) Line(500,500)-(1000,500) Line(750,300)-(750,700) End Sub
运行以下程序后,输出的图形是 Private Sub Command1_Click() Line(500,500)-(1000,500) Line(750,300)-(750,700) End Sub
写出下列程序[如图1]的运行结果:若程序运行后程序= THEN输入x = -2 ,则输出的结果为 ____输出______ .
下列程序段运行后输出的结果是()。 Private Sub Form_Click Dim X#, Y# X = 5: Y = 6 Print X + Y = 11 End Sub
有以下程序: #inClUde <iostream> using namespace std; Class Base { public: Base(int x) { a=x; } void show() { cout<<a; } private: int a; }; class Derived : public Base { public: Derived(int i) :Base(i+1),b(i){} void Show() { cout<<b; } private: int b; }; int main() { Base b(5),*pb; Derived d(1); pb=&d; pb->show(); return 0; } 运行后的输出结果是( )。
相关题目
在窗体上画一个命令按钮(其Name属性为Command1),然后编写如下代码: Option Base 1 Private Sub Command1_Click() Dim a s = 0 a = Array (1,2,3,4) j = 1 For i = 4 To 1 Step - 1 s = s + a (i) * j j = j * 10 Next i Print s End Sub 运行上面的程序,单击命令按钮,其输出结果是______
阅读程序: Option Base 1 Private Sub Form_Click() Dim art,Sum Sum=0 art=Array(1,3,5,7,9,11,13,15,17,19) For i=1 To 10 If arr(i)/3=arr(i)3 Then Sum=Sum+art(i) End If Next i Pdnt Sum End Sub 程序运行后,单击窗体,输出结果为( )。
有如下程序: Option Base 1 Private Sub Form_Click() Dim arr, Sum Sum=0 arr=Array(1, 3, 5, 7, 9, 11, 13, 15, 17, 19) For i=1 To 10 If arE(i)/3=arr(i)3 Then Sum=Sum+arr(i) End If Next i Print Sum End Sub 程序运行后,单击窗体,输出结果为______。
阅读程序: Option Base 1 Private Sub Form_Click() Dim arr, Sum Sum=0 art=Array(1, 3, 5, 7, 9, 11, 13, 15, 17, 19) For i=1 To 10 If arr(i)/3=arr(i)3 Then Sum=Sum+arr(i) End If Next i Print Sum End Sub 程序运行后,单击窗体,输出结果为______。
下面程序运行后的输出结果是 Private Sub Command1_Click() For j=1 To 10 If j Mod 3<>0 Then a=a+j3 Next Print a End Sub
以下程序运行后输出的结果是______。 Private Sub Form. _Click() a=0 For j=1 To 15 a=a+j Mod 3 Next j Print a End Sub
以下程序的输出结果是D)9 12 Option Base 1 Private Sub Command1_Click() Dim s(10),p(3)As Integer k=5 For i=1 To 10 a(i)=i Next i For i=1 To 3 p(i)=a(i*i) Next I For i=1 To 3 k=k+ p(i)*2 Next i Print k End sub
以下程序运行后,消息框的输出结果是( )。 OPTION BASE 1 PRIVATE SUB COMMAND1_CLICK( ) DIM A(10) , P(3) AS INTEGER K=5 FOR I=1 TO 10 A(I) = I NEXT I FOR I=1 TO 3 P(I)=A(I*I) NEXT I FOR I=1 TO 3 K=K+P (I) ~ 2 NEXT I MSGBOX K END SUB
下列程序运行时输出的结果是 Option Base 1 Private Sub Form_Click() Dim x(10) As Integer,y(5) As Integer For i=1 to 10 x(i)=10-i+1 Next For i=1 to 5 y(i)=x(2*i-1)+x(2*i) Next For i=1 to 5 Print y(i) Next End Sub
下列程序运行时输出的结果是 Option Base 1 Private Sub Form_Click() Dim x (10)As Integer,y(5)As Integer For i=1 to 10 x(i)=10-i+1 Next For i=1 to 5 y(i)=x(2*i-1)+x(2*i) Next For i=1 to 5 Print y(i) Next End Sub
以下程序的输出结果是( )。 Option Base 1 Private Sub Command1 Click() Dim a(10),p(3)as Integer k=5 For I=1 to 10 a(i)=I Next I For j=1 to 3 p(i)=a(I*j) Next j For I=1 to 3 k=k+p(I)*2 Next I Print k End Sub
有如下程序: #include<iostream> using namespace std; class Base{ public: Base(int x=0){cout<<x;} }; class Derived:public Base{ public: Derived(int x=0){cout<<x;} private: Base val; }; int main( ){ Derived d(1); return 0; } 程序的输出结果是
有如下程序: #include <iostream> using namespace std; class Base { public: Base(int x=0) { cout<<x; } } class Derived: public Base{ public: Derived(int x=0) { cout<<x; } private: Base val; }; int main() { Derived d(1); return 0; }程序的输出结果是
有如下程序,运行时输出的结果是 ______。 Option Base 1 Private Sub Command1_Click() Dim a(3,3) As Integer For m=1 To 3 For n=1 To 3 a(m-1,n-1)=m+n+1 Next n Next m For m=0 To 2 For n=0 To 2 Print a(n,m); Next n Print Next m End Sub
对窗体编写如下事件过程: Option Base 1 Private Sub Form_KeyPress (KeyAScii AS Integer) arr=Array(12,15,18,20,24) m1=arr(1) m2=1 If fKeyAscii=12 Then For i=2 To 5 If arr(i)>m1 Then m1=arr(i) m2=i End If Next i End If Print m1 Print m2 End Sub 程序运行之后按回车键,输出结果为
对窗体编写如下代码: Option Base 1 Private Sub Form_ KeyPress (KeyAscii As Integer) a=Array(237,126,87,48,498) m1=a(1) m2=1 If KeyAscii=13 Then For i=2 To 5 If a(i)>m1 Then m1=a(I) m2=i End If Next i End If Print m1 Print m2 End Sub 程序运行后,按回车键,输出结果为______ 。
对窗体编写如下代码,当程序运行后,按回车键,输出结果为 ______。 Option Base 1 Private Sub Form. KeyPress(KeyAscii As Integer) a = Array(237,126,87,48,498) m1 = all) m2= 1 If KeyAscii = 13 Then For i = 2 To 5 If a(i)>m1 Then m1 = a(j) m2= i End If Next i End If Print m1 Print m2 End Sub
下列程序运行时输出的结果是( )。 Option Base 1 Private Sub Form_Click() Dimx(10) ForI=1 to 10 x(i)=10-I+1 Next I ForI=10 to 1 step-2 Printx(i); NextI End Sub
下列程序运行时输出的结果是( )。 Option Base 1 Private Sub Form_Click() Dimx(10)As Integer,y(5) As Integer ForI=1 to 10 x(i)=10-I+1 NextI ForI=1 to 5 y(i)cx(2*-1)+x(2*I) NextI ForI=1 to 5 Printy(i); NextI
下列程序运行时输出的结果是( )。 Option Base 1 Const a=10 Private Sub Form_Click() Dim x(a)As Integer k=-1 For i=1 To a x(i)=i*k k=(-1)*k Next i For i=1 To 10 Print x(i) Next i End Sub
广告位招租WX:84302438

免费的网站请分享给朋友吧