Dim rows, cols As Short
        rows = 1
        cols = 2
        Dim numbers(rows, cols) As Short

        Dim min As Short = numbers(0, 0)
        Dim Max As Short = numbers(0, 0)
        Dim zeros As Short = 0

For i As Integer = 0 To rows
            For j As Integer = 0 To cols
                Do
                    Console.WriteLine("Δώστε ένα μη αρνητικό αριθμό " + i.ToString + "." + j.ToString)
                    numbers(i, j) = Console.ReadLine()
                Loop While numbers(i, j) < 0

            Next
        Next

        For i As Integer = 0 To rows
            For j As Integer = 0 To cols
                If numbers(i, j) > Max Then Max = numbers(i, j)
                If numbers(i, j) > Max Then min = numbers(i, j)
                If numbers(i, j) = 0 Then zeros += 1
            Next
        Next
        Console.WriteLine("Το μεγαλύτερο στοιχείο = {0}", max)
        Console.WriteLine("Το μικρότερο στοιχείο = {0}", min)
        Console.WriteLine("Εισάγατε {0} μηδενικούς αριθμούς.", zeros)
      
  For i As Integer = 0 To numbers.GetUpperBound(0)
            For j As Integer = 0 To numbers.GetUpperBound(1)
If numbers(i, j) > Max Then Max = numbers(i, j)
                If numbers(i, j) > Max Then min = numbers(i, j)
                If numbers(i, j) = 0 Then zeros += 1

            Next
        Next
------------------------------------------------------------------------------

Dim intArray(10, 10) As Integer
ReDim Preserve intArray(10, 20)
ReDim Preserve intArray(10, 15)
ReDim intArray(10, 10)


Dim m() As Double
Dim n As Integer
Console.Write("Δώστε πλήθος στοιχείων: ")
n = Console.ReadLine()
'Αλλαγή μεγέθους πίνακα
ReDim Preserve m(n - 1)
------------------------------------------------------------------------------
Dim pinakas(4) As Short
pinakas = {3, 6, 2, 8, 4}

Array.Sort(pinakas)
For i As Integer = 0 To 4
Console.WriteLine(pinakas(i))
Next
Console.WriteLine("Ο αριθμός 4 είναι στη θεση " + Array.IndexOf(pinakas, 4).ToString)
Console.WriteLine("Ο αριθμός 4 είναι στη θεση " + Array.IndexOf(pinakas, CShort(4)).ToString)
Console.ReadKey()

