Ответы на вопрос:
Microsoft qbasic 1.0 dim x as integer, y as integer cls input "x=", x input "y=", y redim c(1 to x, 1 to y) as integer redim k(1 to y) as integer redim a(1 to y) as double randomize timer print "m a t r i x c" for i = 1 to x k(i) = 0: a(i) = 0 for j = 1 to y c(i, j) = int(50 * rnd + 10) print using "###"; c(i, j); if c(i, j) mod 7 = 0 then k(i) = k(i) + 1 a(i) = a(i) + c(i, j) end if next j print next i print for i = 1 to y print using "###"; k(i); next i print " - количество" print "средние" for i = 1 to y if k(i) < > 0 then a(i) = a(i) / k(i) print a(i) else print "infinity" end if next i пример работы программы x=6 y=9 m a t r i x c 38 40 31 33 31 22 54 16 43 23 56 11 19 18 11 34 47 13 59 59 26 23 54 15 53 20 33 28 24 39 46 42 37 47 45 41 20 25 39 35 16 13 12 17 27 17 49 22 29 28 29 52 40 55 0 1 0 2 1 2 0 0 0 - количество средние infinity 56 infinity 35 35 38.5 infinity infinity infinity
Популярно: Информатика
-
Svasik26919.10.2021 05:15
-
Tuna23411.05.2020 21:51
-
ЭЩЩКЕРЕЕЕ15.09.2021 13:16
-
gkulgkuy07.06.2023 08:11
-
ilyator18.01.2020 14:46
-
dmmkuplinov28.10.2020 23:34
-
352351225.11.2020 15:29
-
2маша28.09.2020 13:34
-
Алина0607200322.02.2022 18:17
-
KoteikaOneLove24.10.2022 01:23