动压滑动轴承热平衡计算时,若进油温度ti<35℃,则说明轴承发热不严重。
第1题:
以下能够正确计算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
第2题:
下列程序用来计算1+2+…n,当和大于100时停止计算,请填空。
Private Sub Form_Click()
Dim n as integer,s as integer,I as integer,k as integer
s=0
k=0
n=inputbox(″请输入n的值)
For i=1 to 100
k=k+1
s=s+I
【 】
Next i
Print s
End Sub
第3题:
下面程序段的运行结果是【 】。
Option Base 1
Private Sub swap(a()As InteSer)
For I=1 to 10\2
t=a(i)
a(i)=a(10-1+1)
a(10-1+1)=t
Next1
End Sub
Private Sub Form_Click()
Dim x(10)As Integer
For I=1 to 10
x(i)=I*2
Next1
Swap x()
For1=1 to 10
Print x (i)
Next I
End Sub
第4题:
有如下事件过程:
Private Sub Form. Active ( )
Dim Score (1 to 3) As Integer
Dim i As Integer
Dim t As Variant
Fori=3 To 1 step-1
Score (i) = 2 * i
Next
For Each t In Score
Print t
Next
End Sub
程序运行后窗体上显示的值为【 】。
第5题:
以下能够正确计算n!的程序是
A.Private Sub Command1_Chck( ) 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=l 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=l 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=l Dox=x*i i=i+1 Loop While i>n Print x End Sub
第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题:
下面程序段的运行结果是【 】。
Option Base 1
Private Sub Swap (a() As Integ
For I=1 to 10\2
t=a(I)
a(I)=a(10-I+1)
a(10-I+1)=t
Next I
End Sub
Private Sub Form_Click()
Dim x(10) As Integer
For I=1 to 10
x(I)=I*2
Next I
Swap x()
For I=1 to 10
Print x(I)
Next I
End Sub
第8题:
有一过程如下:
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,运行结果为【 】。
第9题:
以下能够正确计算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
第10题:
下面程序段,运行后的结果是 Private Sub Commandl_Click( ) Dim b%(1 To 4),i%,t# For i=1 To 4 b(i)=i Next i t=Tof(b( ) ) Print"t=";t, End Sub Function Tof(a() As Integer) Dim t#,i% t=1 For i=2 To UBound(A)t=t * a(i) Next i Tof=t End Function
A.t=18
B.t=24
C.t=30
D.t=32