DIM a(1 TO 3,1 TO 3) AS INTEGER
RANDOMIZE TIMER
FOR i=1 TO 3
FOR j=1 TO 3
a(i,j)=RND*45-22
PRINT a(i,j)
NEXT j
NEXT i
FOR j=1 TO 3
IF a(2,j)>0 THEN s=s+a(2,j)
NEXT j
PRINT "s=";s
END
Тестирование выполнено в программе QB64 ( Скачать )
DIM a(1 TO 3,1 TO 3) AS INTEGER
RANDOMIZE TIMER
FOR i=1 TO 3
FOR j=1 TO 3
a(i,j)=RND*45-22
PRINT a(i,j)
NEXT j
NEXT i
FOR j=1 TO 3
IF a(2,j)>0 THEN s=s+a(2,j)
NEXT j
PRINT "s=";s
END
Тестирование выполнено в программе QB64 ( Скачать )