修改时间:2024-07-31 浏览次数:120 类型:期中考试
请回答下列问题:
Private Sub Cmd1_Click( )
Dim bai As Integer, shi As Integer Dim ge As Integer, n As Integer
n = Val(Text1.Text)
bai = ①
shi = n \ 10 mod 10
ge = ②
Text2.Text = Str(ge * 100 + shi * 10 + bai) End Sub
① ②
请回答下列问题:
Private Sub Command1_Click()
Dim s As String, sum As Integer
Dim i As Integer, j As Integer
①
sum = 0
j = 0
For i = 1 To Len(s)
ch = Mid(s, i, 1)
If ch >= "0" And ch <= "9" Then
j = ②
Else
sum = sum + Val(Mid(s, i - j, j))
j = 0
End If
Next i
Label1.Caption = "数字之和为:" + Str(sum) End Sub
① ②
请回答下列问题:
Private Sub Command1_Click()
Dim s As String, ch As String, mw As String
Dim i As Integer, j As Integer
s = Text1.Text
i = 1
j = 1
mw = “”
Do While i <= Len(s)
ch = ①
j = j + 1
mw = ②
i = i + j
Loop
Text2.Text = ③
End Sub
① ② ③
试题篮