m = a(1)
i =2
Do While i <= 10
If m < a(i) Then m = a(i)
i =i+ 1
Loop
该程序段执行后,变量m中存储的是( )
Dim i As Integer,c As String,s As String,t As String
s=“China2014IT”:t=“”
For i=1 To Len(s)
c=Mid(s,i,1)
If c>=“a” And c<=“z” Then t=t+c
Next i
Label1.Caption=t
该程序段运行后,标签Label1中显示的内容是( )
Function lsc(x,y) As Integer
If x>y Then
lsc=x-y
Else
lsc=y-x
End If
End Function
Private Sub Command1_Click( )
Dim a1 As Integer,a2 As Integer
a1=Val(Text1.Text)
a2=Val(Text2.Text)
Label1.Caption=
End Sub
要实现上述功能,程序画线处应填入的语句为( )
Function gcd(a As Integer, b As Integer) As Integer
Do While b>0
c=a Mod b
a=b
b=c
Loop
End Function
调试中发现计算结果一直是0。经过仔细观察与分析,发现错误的原因是( )
Private Sub Command1_Click( )
Dim x As Integer
Dim y As String
x=Val(Text1.Text)
If x>=95 Then
y=“非常满意”
ElseIf x>=80 Then
y=“满意”
ElseIf x>=60 Then
y=“基本满意”
Else
y=“不满意”
End If
Label1.Caption=y
End Sub
在文本框Text1中输入50,单击命令按钮Command1后,在标签Label1中显示( )
Private Sub Command1_Click( )
Dim i As Integer, p As Integer
p=0
For i=100 To 999
If Then
List1.AddItem Str(i)
End If
Next i
List1.AddItem Str(p)
End Sub
为实现上述功能,请在程序划线处填入合适的语句。