kk258966

5-1

Nov 3rd, 2013
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Public Class Form1
  2.  
  3.     Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
  4.         End
  5.  
  6.     End Sub
  7.  
  8.     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  9.         Dim n As Integer
  10.         n = Val(TextBox1.Text)
  11.         If n Mod 2 = 1 Then
  12.             Label2.Text = n & "  為奇數"
  13.         Else
  14.             Label2.Text = n & "  為偶數"
  15.         End If
  16.     End Sub
  17. End Class
Advertisement
Add Comment
Please, Sign In to add comment