Microsoft QBasic 1.0DIM x AS INTEGER, y AS INTEGERCLSINPUT "X=", xINPUT "Y=", yREDIM C(1 TO x, 1 TO y) AS INTEGERREDIM k(1 TO y) AS INTEGERREDIM a(1 TO y) AS DOUBLERANDOMIZE TIMERPRINT "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 PRINTNEXT iPRINTFOR i = 1 TO y PRINT USING "###"; k(i);NEXT iPRINT " - Количество"PRINT "Средние"FOR i = 1 TO y IF k(i) <> 0 THEN a(i) = a(i) / k(i) PRINT a(i) ELSE PRINT "Infinity" END IFNEXT iПример работы программыX=6Y=9M 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 56Infinity 35 35 38.5InfinityInfinityInfinity