MOD+Questions+(VB)


 * THIS PROGRAM WILL PROVIDE A 0, IF THE BUTTON IS CLICKED AN EVEN NUMBER OF TIMES. IT WILL PROVIDE A 1, IF THE BUTTON IS CLICKED AN ODD NUMBER OF TIMES.**

Public Class Form1 Dim intCounter As Integer = 0 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClick.Click

If intCounter Mod 2 = 0 Then lblNumber.Text = 0 ElseIf intCounter Mod 2 = 1 Then lblNumber.Text = 1 End If

intCounter += 1

If intCounter = 10 Then Me.Close End If End Sub End Class