有下列程序段,单击命令按钮执行程序后,输出结果为( )。 Option Base 1 Private Sub Command1_Cliek() Dim x x=Array(23, -5, 17, 38, -31, 46, 11, 8, 5, -4) s1=0 s2=0 Fork=1 To 10 If (x(k)>0) Then s1=s1+x(k) Else s2=s2+x(k) End If Next k Y=s1/Abs(s2) Print Y End Sub
A.148
B.40
C.-40
D.3.7
第1题:
有如下的程序:

单击命令按钮后,输出结果为:( )
A.2 2
B.4 4
C.5 5
D.6 6
第2题:
单击命令按钮,下列程序段的输出结果为______。 Private Sub Command1_Click() Dim n As Integer n = 5 While n <= 10 n = n + 2 Print n; Wend End Sub
A.5 7 9 11
B.6 8 10
C.7 9 11
D.6 8 10 12
第3题:
在窗体上有一个命令按钮,然后编如下事件过程:

程序运行后,单击命令按钮,在输入对话框内输入-1,输出结果是 。
第4题:
有以下程序#include <iostream>using namespace std:class Base{private: char c;public: Base(char n) :c(n) {} ~Base ( ) { cout<<c; }}; class Derived : public Base{private: char c;public: Derived(char n):Base (n+1),c(n) {} ~Derived() { cout<<c; }};int main(){ Derived obj('x'); return 0;} 执行后的输出结果是
A.xy
B.yx
C.x
D.y
第5题:
有以下程序 #include<iostream> using namespace std; class Base { private: char c; public: Base(char n):c(n){} ~Base() { cout<<c; } }; class Derived:public Base { private: char c; public: Derived(char n):Base(n+1),c(n){} ~Derived() { cout<<c; } }; int main() { Derived obj('x'); return 0; } 执行后的输出结果是
A.xy
B.yx
C.x
D.y
第6题:
在窗体上画一个名为Command1的命令按钮,编写如下程序:

程序运行后,单击命令按钮,输出的结果是_________。