(1)(2)(3)(4)自己做,如果连这个都不会,那你就别学VB了,嘿嘿!
(5)的代码给你:很简单。
Private Sub Command1_Click()
Dim Inch As Integer, Cm As Single
Inch = Text1.Text
Cm = Inch * 2.54
Text2.Text = Cm
End Sub
题二:
Private Sub Command1_Click()
Dim n As Integer, i As Integer
n = Text1.Text
If n > 100 Then
MsgBox "输入的整数不能超过100!"
Else
If n Mod 2 = 0 Then
Text2.Text = "偶数"
Else
Text2.Text = "奇数"
End If
End If
End Sub