CLS
RANDOMIZE TIMER
n = 6: p = 1
DIM a(n)
FOR i = 1 TO n
a(i) = FIX(RND * 9 + 1)
NEXT
FOR i = 1 TO n
s = s + a(i)
p = p * a(i)
NEXT
FOR i = 1 TO n
PRINT a(i);
NEXT
PRINT
PRINT "summa:"; s, "pr:"; p
Тестирование выполнено в программе QB64 ( Скачать )