Private Sub Command1_Click()
Dim n As Single, i As, c As Integer
List1.Clear
n = Val(Text1.Text)
If n - Int(n) > 0.5 Then
‘n小数部分大于0.5的加1,0.5及以下的加0.5
End If
c = n * 2 - 10
Label1.Caption = "适合你的鞋码为:" + Str(c)
For i =To n+2 step 0.5
c = i*2-10
If Int(i) = i Then
List1.AddItem Str(i) + " " + Str(c)
Else
List1.AddItem Str(i) + " " + Str(c)
End If
Next i
End Sub