Вы находитесь на странице: 1из 2

QUESTION CODING FOR FORM :

Public Class Form1 Dim number As Integer Private Sub btnCheckIt_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCheckIt.Click If IsNumeric(txtNumber.Text) Then number = txtNumber.Text If (number Mod 2 <> 0) Then lblDisplay.Text = txtNumber.Text & " is odd" Else lblDisplay.Text = txtNumber.Text & " is even" End If Else lblDisplay.Text = "value must be numeric" End If txtNumber.Text = "" txtNumber.Focus() End Sub End Class

INTERFACE OUTPUT :

Вам также может понравиться