假定有以下函数过程: Function Fun(S As String) As String Dim S1 As String For i=1 To Len(S) s1=LCase(Mid(S,i,1))+s1 Next i Fun=S1 End Function 在窗体上画一个命令按钮,然后编写如下事件过程: Private Sub Command1_Click() Dim Str1 As String, Str2 As String Str1=InputBox("请输入一个字符串"):Str2=Fun(Str1) Print Str2 End Sub 程序运行后,单击命令按钮,如果在输入对话框中输入字符串“abcdefg”,则单击“确定” 按钮后在窗体上的输出结果为
ABCDEFG
B. abcdefg
C. GFEDCBA
D. gfedcba
查看答案
编写如下程序: 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