网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

有下列程序段,单击命令按钮执行程序后,输出结果为( )。 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


参考答案

更多 “ 有下列程序段,单击命令按钮执行程序后,输出结果为( )。 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 SubA.148B.40C.-40D.3.7 ” 相关考题
考题 在窗体上添加一个命令按钮(名为Commandl),然后编写如下程序:打开窗体运行后,单击命令按钮,消息框的输出结果为__________。

考题 在窗体上画一个命令按钮,其名称为Commandl,然后编写如下事件过程:程序运行后,单击命令按钮,其输出结果为__________。

考题 在窗体上画一个命令按钮,然后编写如下程序(假定变量x是—个窗体级变量)Dim x As IntegerSub inc(a AS Integer)X=K+aEnd SubPrivate Sub Command1_Click()inc2inc3inc4Prmt x;Ead Sub程序执行后,单击Command1命令按钮,输出的结果是【 】。

考题 单击命令按钮时,下列程序段的执行结果为( )。A.8B.6C.4D.2

考题 有如下的程序:单击命令按钮后,输出结果为:( )A.2 2B.4 4C.5 5D.6 6

考题 有以下程序include using namespace std:class Base{private:char c;public:Base(cha 有以下程序#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.xyB.yxC.xD.y

考题 单击命令按钮,下列程序段的输出结果为______。 Private Sub Command1_Click() Dim n As Integer n = 5 While n <= 10 n = n + 2 Print n; Wend End SubA.5 7 9 11B.6 8 10C.7 9 11D.6 8 10 12

考题 有以下程序includeusing namespace std;class Base{private:char c;public:Base(char 有以下程序 #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.xyB.yxC.xD.y

考题 在窗体上有一个命令按钮,然后编如下事件过程:程序运行后,单击命令按钮,在输入对话框内输入-1,输出结果是 。

考题 在窗体上画一个名为Command1的命令按钮,编写如下程序:程序运行后,单击命令按钮,输出的结果是_________。