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

Powerd by Shree Guru Kripa Computer


vb.net_array Program.


This is Program of array. This is include input box also. Use array in this program and Show message box average. This is UBound Program Also.

Public Class Form1
Dim N(4), I, A As Int16
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
For I = 0 To 4
N(I) = InputBox("ENTER NUMBER :")
Next
A = AVG(N)
MsgBox(" average is :" & A)
End Sub

Function AVG(ByVal X() As Int16) As Int16
Dim J, S As Int16
For J = 0 To UBound(X)
S = S + X(J)
Next
Return (S / X.Length)
End Function
End Class