题型:综合题 题类:常考题 难易度:困难
浙江省临安市昌化中学2019届高三上学期信息技术期末模拟试卷
实现上述功能的VB程序如下,但加框代码有错,请改正。
Private Sub Command1_Click()
Dim d(1 To 1001) As Integer
Dim str1 As String, str2 As String
Dim i As Integer, n As Integer, k As Integer, s As Integer
str1 = Text1.Text
n = Len(str1)
For i = 1 To n
D(i) = Val(Mid(str1, i, 1))
Next i
s = 0
k = Val(Text2.Text)
For i = n To 1 Step -1
①
s = d(i) \ 10
D(i) = d(i) Mod 10
Next i
If s <> 0 Then str2 = CStr(s) Else str2 = "" 'CStr()不会在返回的字串前加1个空格。
For i = 1 To n
②
Next i
Text3.Text = str2
End Sub
① ②
试题篮