VBI 39.PNG

Private Sub Command1_Click()
Dim n, x, y, o, e, i As Integer
Cls
For i = 1 To 5
    n = InputBox("Enter Number", "Integer Needed")
    x = n / 2
    y = Int(x)
    If x = y Then
        e = e + 1
    Else
        o = o + 1
    End If
Next i
Print "Total Even No = ", e
Print "Total Odd No = ", o
End Sub

vbo-39

Advertisements