直流电机线圈内部的感应电势eQ和感生电流iQ都是()
第1题:
程序执行结果s的值是【 】.
Private Sub Command l-Click ()
I =0
Do
S= I +S
I = I + l
Loop Until I >=4
End Sub
第2题:
下面程序的输出结果是【 】。
Private Sub Form_Click()
i=0
Do Until 0
i=i+1
if i>10 then Exit Do
Loop
Print i
End Sub
第3题:
有一过程如下:
Sub Sub1(m As Integer,total As Long)
Dim i As Integer
total=1
For i=1 To m
total=total*i
Next
End Sub
调用它的事件过程如下:
Private Sub Command1_Click()
Dim tot As Long,a As Integer
a=Val(InputBox("请输入数据"))
Call Sub1(a,tot)
Print tot
End Sub
则输入数据5,运行结果为【 】。
第4题:
下面程序的输出结果是【 】。
Private Sub Form_Click()
i=0
Do Until 0
i=i+1
if i>10 then Exit Do
Loop
Print i
End Sub
第5题:
以下程序的运行结果是( ) #define MAX 10 int a[MAX],i; main() { printf("\n");sub1();sub3(A) ,sub2(),sub3(A) ; } sub2() { int a[MAX],i,max; max=5; for(i=0;i<max;i++)a[i]=i; } sub1() {for(i=0;i<MAX;i++)a[i]=i+i; } sub3(int a[]) { int i; for(i=0;i<MAX,i++)printf("%d",a[i]); printf("\n"); }
A.0 2 4 6 8 10 12 14 16 18 0 1 2 3 4
B.0 1 2 3 4 0 2 4 6 8 10 12 14 16 18
C.0 1 2 3 4 5 6 7 8 9 0 1 2 3 4
D.0 2 4 6 8 10 12 14 16 18 0 2 4 6 8 10 12 14 16 18
第6题:
阅读程序: Sub p( b () As Integer)For i =1To 4 b(i) = 2(iNext i End Sub Private Sub Command1_Click()Dim a (1 To 4) As Integer a(1)=5 a(2)=6 a(3)=7 a(4)=8 call p (a) For i=1 To 4 Print a(i) Next iEnd Sub运行上面的程序,单击命令按钮,输出结果为。
第7题:
以下能够正确计算n!的程序是
A.Private Sub Command1 Click() n=5:x=1 Do x=x * I I=I + 1 Loop While I < n Print x End Sub
B.Private Sub Command1_Click() n=5:X=1:I=1 Do X=X*I I=I + 1 Loop While I <n Print x End Sub
C.Private Sub Command1_Click() n=5:X=1:I=1 Do X=X * I I=I + 1 Loop While I<=n Print X End Sub
D.Private Sub Command1_Click() n=5:X=1:I=1 Do x=x * I I=I + 1 Loop While I>n Print X End Sub
第8题:
有以下程序: Sub subP(b()As Integer) For i=1 To 4 b(i)=2*i Next i End Sub Private Sub Command1_Click() Dim a(1 To 4)As Integer a(i)=5 a(2)=6 a(3)=7 a(4)=8 subP a() For i=1 To 4 Print a(i) Next i End Sub 运行上面的程序,单击命令按钮,输出结果为______。
A. 2 4 6 8
B.5 6 7 8
C.10 12 14 6
D.出错
第9题:
设有如下程序: Private Sub search(a()As Variant,ByVal key As Variant,index%) Dim I% For I = Lbound(a)To Ubound(A)If key=a(I)Then index=I Exit Sub End If Next I index=-1 End Sub Private Sub Form_Load() Show Dim b()As Variant Dim n As Integer b=Array(21,64,92,15,72,38,45,72) Call search(b, 45, n) Print n End Sub 程序运行后,输出的结果是
A.2
B.6
C.10
D.12
第10题:
在窗体上画一个名称为CoilTlilandl的命令按钮,然后编写如下事件过程: Private Sub command1 Click() Dim m As Integer, i As Integer, x(3)As Integer For i=0 To 3:x(i)=i:Next i For i = 1 To 2: Call sub1(x,i):Next i For i = 0 To 3: Print x(i);: Next i End Sub Private Sub sub1(a()As Integer,k As Integer) Dim i As Integer Do a(k)=a(k)+a(k+1) j = j + 1 Loop While j < 2 End Sub 程序运行后,单击命令按钮,则窗体上显示的内容是
A.0 3 7 5
B.0 1 2 3
C.3 2 4 5
D.0 5 8 3