修改时间:2024-07-31 浏览次数:200 类型:期中考试
n = Len(s) 's是判断的字符串
k = 0: j = n
For i = 1 To n \ 2
Next i
If k = 0 Then Label1.Caption = "对称" Else Label1.Caption = "不对称"
方框中的代码由以下三部分组成:
①j = j - 1
②If c1< >c2 Then k = k + 1
③c1 = Mid(s,i,1) : c2 = Mid(s,j,1)
代码顺序正确的是( )
图a
请回答下列问题:
图b
图c
Private Sub Command1_Click()
Dim i As Integer, j As Integer, s As Long
s = 1
i =
If i >= 1 And i <= 9 Then
For j = 1 To i
s =
Next j
Label2.Caption = Str(i) & "的阶乘为:" & Str(s)
Else
Label2.Caption = "请重新输入1~ 9之间的任意数字"
End If
End Sub
Private Sub Cmd1_Click()
Dim i As Integer, j As Integer, ans As Integer
Dim ch As String, s As String
s = Text1.Text
ans = 0
j = 1
For i = 1 To Len(s)
If ch = "," Then
ans =
j = i + 1
End If
Next i
Label1.Caption = "计算结果是:" +Str(ans)
End Sub
试题篮