编写如下程序: Private Sub Command1_Click() Dim m As Integer, n As Integer n=2 Form=1 To 3 Print proc(n); Next m End Sub Function proc(i As Integer) Dim a As Integer, Static b As Integer a=a+1:b=b+1 proc=a*b+i End Function 程序运行后,单击命令按钮Command1,输出结果为
A. 3 3 3
B. 3 4 5
C. 3 5 6
D. 1 2 3
查看答案
燕麦细胞癌(oat cell carcinoma)
以下能对正实数d的第3位小数四舍五入的表达式是
A. 0.01*Int(d+0.005)
B. 0.01*Int(100*(d+0.005))
C. 0.01*Int(100*(d+0.05))
D. 0.01*Int(d+0.05)
窗体上有名称为Command1的命令按钮,名称分别为Label1、Label2、Label3的标签。编写如下程序: Private x As Integer Private Sub Command1_Click() Static y As Integer Dim z As Integer n=5:z=z+n:y=y+n:x=x+y Label1=x:Label2=y:Label3=z End Sub 运行程序,连续3次单击命令按钮后,3个标签中分别显示的是
A. 5 5 5
B. 15 10 5
C. 15 15 15
D. 30 15 5
编写如下程序: Private Sub Command1_Click() Dim n As Integer:Static s As Integer For n=1 To 3 s=s+n Next Print s End Sub 程序运行后,第三次单击命令按钮Command1时,输出结果为
A. 3
B. 6
C. 9
D. 18