填空题

下列程序段实现的功能为:在文本框中输入一个整数,然后判断该整数的奇偶性。请完成相应的程序代码。 Private Sub Command1_Click() Dim x AS Integer x=Val(Right (Text1.Text,2)) If x Mod 2=0 Then Labe11.Caption=“偶数” Else Labe11.Caption=“奇数” End If Text1.SetFocus End Sub Private Sub Text1_KeyPress(KeyAscii As Integer) If 【10】 ThenKeyAscii=0 End Sub

【参考答案】

[10]KeyAseii<48 Or KeyAscii>57