题型:综合题 题类:常考题 难易度:普通
高中信息技术综合库——枚举算法3
问题:实现上述功能的VB 代码如下,但加框处代码有错,请改正。
Private Sub Command1_Click()
Dim n as long , sum as long , i As Long Dim x as long , y as long
List1.Clear
n = Val(Text1.Text) sum = 0
For i = 10 To n
x = ‘①
y = 0
Do While x > 0
y = ‘②
x = x \ 10
Loop
If y = i Then
List1.additem Str(i)
sum = sum+1
End if
Next i
Label1.caption = “共有”& Str(sum) & “个回文数” End Sub
①②
试题篮