You are on page 1of 1

Module Module1

Sub Main()
Dim a(5), i, small As Integer
For i = 1 To 5
Console.WriteLine("enter number:")
a(i) = Integer.Parse(Console.ReadLine())
Next
small = min(a, 5)
Console.WriteLine("minimum no is{0}", small)
End Sub

Private Function min(ByVal x() As Integer, ByVal n As Integer) As Integer


Dim m, i As Integer
m = x(1)
For i = 2 To n
If m > x(i) Then
m = x(i)
End If
End Function

End Module

You might also like