Module Module1
Sub Main()
Dim line As String, n As Integer, m As Integer, i As Integer, _
BIG As Integer, small As Integer, cnt As Integer =
0
line = Console.ReadLine()
While Not line Is Nothing
n = CInt(line)
m = CInt(Console.ReadLine())
cnt = cnt +
1
small = m
BIG = m
For i =
1
To n -
1
m = CInt(Console.ReadLine())
If m > BIG Then
BIG = m
ElseIf m < small Then
small = m
End If
Next
Console.WriteLine(
"Data set "
& cnt &
" has range = "
& _
Math.Abs(BIG - small))
Console.WriteLine()
line = Console.ReadLine()
End While
End Sub
End Module