DIM y(40)
RANDOMIZE TIMER
PRINT "massiv"
FOR i = 1 TO 40
y(i) = INT(RND * 20) - 10
PRINT y(i);
NEXT
PRINT
FOR i = 1 TO 40
IF ABS(y(i)) < 2 THEN k = k + 1: s = s + y(i)
NEXT
PRINT "kol-vo chisel="; k
PRINT "summa="; s
DIM y(40)
RANDOMIZE TIMER
PRINT "massiv"
FOR i = 1 TO 40
y(i) = INT(RND * 20) - 10
PRINT y(i);
NEXT
PRINT
FOR i = 1 TO 40
IF ABS(y(i)) < 2 THEN k = k + 1: s = s + y(i)
NEXT
PRINT "kol-vo chisel="; k
PRINT "summa="; s