设事故树的最小径集为{X1,X4}、{X1,X2,X5,X6}、{X2,X3,X4},求事故树的最小割集。
第1题:
(12)有下列Sub过程: Sub Sub(x As Single,y As Single) t=x x=t/y y=t Mody End Sub 在窗体上的命令按钮Commandl中,编写下列事件过程,执行该事件过程调用Sun过程,结果是( )。 Private Sub Commandl_Click() Dim a As Single Dim b As Single a=5 b=4 Sun a,b Print a;b End Sub A.1.25 1 B.5 4 C.4 5 D.1 1.25
第2题:
Command1_Click()事件代码如下: Private Sub Command1_Click() Dim x As Integer, Y As Integer x = 6 : Y : 8 Call ABC(X, Y) Print X; Y End Sub Private Sub ABC(ByVal X As Integer,Y As Integer) X = X + 4 Y = Y = 2 End Sub 事件发生后,X和Y的值分别为 ______。
A.6, 8
B.10, 10
C.10, 8
D.6, 10
第3题:
单击命令按钮时,下列程序的执行结果是
Private Sub Command1_Click()
BT 4
End Sub
Private Sub BT(x As Integer)
x=x * 2 + 1
If x < 6 Then
Call BT(x)
End If
x=x * 2
Print x;
End Sub( )。
A.15
B.16
C.17
D.18
第4题:
有如下一个Sub过程: Sub mlt(ParamArray numbers()) n=1 For Each x In numbers n=n*x Next x Print n End Sub 在一个事件过程中如下调用该Sub过程: Private Sub Command1_Click() Dim a As Integer Dim b As Integer Dim c As Integer Dim d As Integer a=1 b=2 c=3 d=4 mlt a,b,c,d End Sub 该程序的运行结果为( )。
A.12
B.24
C.36
D.48
第5题:
有如下程序: Private Sub Command1_Click() Dim a As Single Dim b As Single a=5:b=4 Call Sub1(a,b) End Sub Sub Sub1(x As Single,y As Single) t=X X=t\Y Y=t Mod y End Sub 在调用运行上述程序后,a和b的值分别为
A.0 0
B. 1 1
C.2 2
D.1 2
第6题:
A、Public Sub Sum(x ; y)
B、Public Sub Sum(ByVal x, ByVal y)
C、Public Sub Sum(x As Integer,y As Integer)
D、Public Sub Sum(x%, y%)
第7题:
在窗体中添加一个名称为Command1的命令按钮,然后编写如下程序: Public x As Integer Private Sub Command1_Click() x=10 Call s1 Call s2 MSgBox x End Sub Private Sub s1() x=x+20 End Sub Private Sub s2() Dim x As Integer x=X+20 End Sub 窗体打开运行后,单击命令按钮,则消息框的输出结果为______。
A.10
B.30
C.40
D.50
第8题:
下列过程定义语句中,参数不是对象的定义语句是( )。
A.Sub Pro4(x As Form)
B.Sub Pro4(y As Control)
C.Sub Pro4(Form1 As Form,Labell As Control)
D.Sub Pro4(x As Currency)
第9题:
若有以下变量和函数说明: #include<iostream.h> charCh='*'; void sub(int x,int y,char ch,double*Z) { switch(ch) { case'+':*Z=x+y;break; case'-':*Z=x-y;break: case'*':*Z=x*y;break; case'/':*z=x/y;break: } } 以下合法的函数调用语句是( )。
A.sub(10,20,Ch,y);
B.sub(1.2+3,2*2,'+',&Z);
C.sub(sub(1,2,'+',&y),sub(3,4'+',&x),'-',&y);
D.sub(a,b,&x,ch);
第10题:
在窗体上画一个命令按钮,然后编写下列程序: Private Sub Command12_Click() Tt 3 End Sub Sub Tt(a As Integer) Static X As Integer X=X * a + 1 Print x; End Sub 连续三次单击命令按钮,输出的结果是
A.1 5 8
B.1 4 13
C.3 7 4
D.2 4 8