DIM a(4, 4)
DATA 1,2,0,3,2,3,1,2,0,2,3,1,4,0,2,1
FOR i = 1 TO 4
FOR j = 1 TO 4
READ a(i, j)
NEXT
NEXT
FOR i = 1 TO 4
s = s + a(i, i)
NEXT
PRINT s
Тестирование выполнено в программе QB64 ( Скачать )
DIM a(4, 4)
DATA 1,2,0,3,2,3,1,2,0,2,3,1,4,0,2,1
FOR i = 1 TO 4
FOR j = 1 TO 4
READ a(i, j)
NEXT
NEXT
FOR i = 1 TO 4
s = s + a(i, i)
NEXT
PRINT s
Тестирование выполнено в программе QB64 ( Скачать )