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

Powerd by Shree Guru Kripa Computer


vb.net_smallest_number_by_array


This is vb.net_smallest_number_by_array Program.This is best Example of "For" loop and "If" Branching statment.

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

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
L = A(0)
For I = 0 To 5
ListBox1.Items.Add(A(I))
If A(I) < L Then
L = A(I)
End If
Next
MsgBox("SMALLEST NUMBER :" & L)
End Sub
End Class