INPUT n
INPUT m
DIM a(n, m), b(n)
FOR i = 1 TO n
FOR j = 1 TO m
INPUT "vvedite element "; a(i, j)
NEXT
NEXT
FOR i = 1 TO n
FOR j = 1 TO m
PRINT a(i, j); " ";
NEXT
PRINT
NEXT
FOR i = 1 TO n
FOR j = 1 TO m
b(i) = b(i) + a(i, j)
NEXT
NEXT
FOR i = 1 TO n \ 2
PRINT b(i); " ";
NEXT
PRINT
PRINT "summy strok"
FOR i = n - n \ 2 + 1 TO n
PRINT b(i); " ";
NEXT
Следующий вариант
10 INPUT "Chislo strok:", N
20 INPUT "Chislo stolbcov:", M
25 S = 0
30 FOR I = 1 TO N
40 FOR J = 1 TO M
50 INPUT A(I, J)
60 NEXT J
70 NEXT I
80 FOR I = 1 TO N / 2
90 FOR J = 1 TO M
100 S = S + A(I, J)
105 PRINT S
110 NEXT J
120 NEXT I
130 FOR I = N / 2 TO N
140 FOR J = 1 TO M
150 S = S + A(I, J)
160 PRINT S
170 NEXT J
180 NEXT I
190 END
Тестирование выполнено в программе QB64 ( Скачать )