Module Module1 Sub Main() Dim a As String = Console.ReadLine() If (a = "Зима") Then Console.WriteLine("Декабрь (31), Январь (31), Февраль (28-29)") Console.WriteLine("90-91 д.") ElseIf (a = "Весна") Then Console.WriteLine("Март (31), Апрель (30), Май (31)") Console.WriteLine("92 д.") ElseIf (a = "Лето") Then Console.WriteLine("Июнь (30), Июль (31), Август (31)") Console.WriteLine("92 д.") ElseIf (a = "Осень") Then Console.WriteLine("Сентябрь (30), Октябрь (31), Ноябрь (30)") Console.WriteLine("91 д.") End If Console.ReadKey() End Sub End Module
Sub ()Dim A(1 To 4, 1 To 4) As IntegerDim B(1 To 3, 1 To 3) As IntegerRandomizeFor i = 1 To 4 For j = 1 To 4 A(i, j) = Int((10 * Rnd) + 1) Cells(i, j) = A(i, j) Next jNext iFor i = 1 To 3 For j = 1 To 3 B(i, j) = Int((10 * Rnd) + 1) Cells(i + 5, j) = B(i, j) Next jNext iCall ObrabotkaA(A)Call ObrabotkaB(B)Call Result(A, B)End SubSub ObrabotkaA(A)CollumnMax = 0CollumnMin = 0SummMax = 0SummMin = 999For j = 1 To 4Summ = 0 For i = 1 To 4 Summ = Summ + A(i, j) Next i If Summ > SummMax Then SummMax = Summ CollumnMax = j End If If Summ < SummMin Then SummMin = Summ CollumnMin = j End IfNext jFor i = 1 To 4 Temp = A(i, CollumnMax) A(i, CollumnMax) = A(i, CollumnMin) A(i, CollumnMin) = TempNext iEnd SubSub ObrabotkaB(B)CollumnMax = 0CollumnMin = 0SummMax = 0SummMin = 999For j = 1 To 3Summ = 0 For i = 1 To 3 Summ = Summ + B(i, j) Next i If Summ > SummMax Then SummMax = Summ CollumnMax = j End If If Summ < SummMin Then SummMin = Summ CollumnMin = j End IfNext jFor i = 1 To 3 Temp = B(i, CollumnMax) B(i, CollumnMax) = B(i, CollumnMin) B(i, CollumnMin) = TempNext iEnd SubSub Result(A, B)For i = 1 To 4 For j = 1 To 4 Cells(i, j + 5) = A(i, j) Next jNext iFor i = 1 To 3 For j = 1 To 3 Cells(i + 5, j + 5) = B(i, j) Next jNext iEnd Sub
Module Module1
Sub Main()
Dim a As String = Console.ReadLine()
If (a = "Зима") Then
Console.WriteLine("Декабрь (31), Январь (31), Февраль (28-29)")
Console.WriteLine("90-91 д.")
ElseIf (a = "Весна") Then
Console.WriteLine("Март (31), Апрель (30), Май (31)")
Console.WriteLine("92 д.")
ElseIf (a = "Лето") Then
Console.WriteLine("Июнь (30), Июль (31), Август (31)")
Console.WriteLine("92 д.")
ElseIf (a = "Осень") Then
Console.WriteLine("Сентябрь (30), Октябрь (31), Ноябрь (30)")
Console.WriteLine("91 д.")
End If
Console.ReadKey()
End Sub
End Module