INPUT "vvedite razmer massiva ", n
DIM a(n)
RANDOMIZE TIMER
PRINT "ishodnyj massiv"
FOR i = 1 TO n
a(i) = INT(RND * 99) + 2
PRINT a(i);
NEXT
FOR i = 1 TO n
f = 0
FOR j = 2 TO SQR(a(i))
IF a(i) MOD j = 0 THEN f = 1
NEXT
IF f = o THEN m = m + 1
NEXT
PRINT
PRINT "v massive "; m; " prostyh chisel"
Тестирование выполнено в программе QB64 ( Скачать )