Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Imports System
- Module Program
- Sub Main(args As String())
- Dim N As Integer
- Dim c As Integer
- Dim min As Integer
- Dim max As Integer
- Dim mini As Integer
- Dim maxi As Integer
- min = 2147483647
- max = -2147483648
- Console.WriteLine("Print N")
- N = Console.ReadLine
- Dim matr(N, N) As Integer
- For i As Integer = 1 To N
- If matr(0, i) > max Then
- max = matr(0, i)
- maxi = i
- End If
- Next i
- For j As Integer = 1 To N
- If matr(N - 1, j) < min Then
- min = matr(N - 1, j)
- mini = j
- End If
- Next j
- matr(0, maxi) = min
- matr(N - 1, mini) = max
- Console.WriteLine(c)
- End Sub
- End Module
Advertisement
Add Comment
Please, Sign In to add comment