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