Ответы на вопрос:
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
Популярно: Информатика
-
crossstitchworozbh9320.05.2022 16:23
-
marchaika201414.02.2023 02:45
-
ксюша169315.08.2022 09:58
-
слар25.01.2022 08:24
-
Катрин70325.02.2022 15:59
-
sashakesha200620.08.2021 04:46
-
Milanami115.02.2022 00:29
-
зика2301.07.2020 04:48
-
Вероникалобова25.02.2022 06:17
-
tatu26126.01.2022 10:39