Web Site Devloped By Abhishek Mishra
Tech. Help By Anand Mishra
Contact no. 9425355631

Powerd by Shree Guru Kripa Computer


vb.net_Even_odd_Number


This is vb.net_Even_odd_Number Program.There you see Even Number is Show one list box and odd Number is show another list box. In this Program use for Loop for input and out put.

Public Class Form1
Dim A(5), I As Int16
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
For I = 0 To 5
A(I) = InputBox("ENTER NUMBERS:")
Next
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
ListBox1.Items.Clear()
ListBox2.Items.Clear()
For I = 0 To 5
If A(I) Mod 2 = 0 Then
ListBox1.Items.Add(A(I))
Else
ListBox2.Items.Add(A(I))
End If
Next
End Sub
End Class