Zmodule Sub Dim As Integer Dim As Integer Dim As Integer Dim As Integer Dim As Integer For To
Zmodule Sub Dim As Integer Dim As Integer Dim As Integer Dim As Integer Dim As Integer For To
zModule Module1
Sub Main()
Dim batas As Integer
Dim bilangan(10) As Integer
Dim max As Integer = 999999
Dim min As Integer = -999999
Dim BilMax, BilMin As Integer
For batas = 0 To 9
Console.Write("masukkan bil {0} = ", batas + 1)
bilangan(batas) = Console.ReadLine
If (bilangan(batas) > max) Then
max = bilangan(batas)
BilMax = batas
End If
If (bilangan(batas) < min) Then
min = bilangan(batas)
BilMin = batas
End If
Next
Console.WriteLine("nilai max : {0} dan min : {1}", max, min)
Console.ReadLine()
End Sub
End Module
End Sub
End Module