CLS
DEFDBL A-Z
INPUT "vvedite n"; n
DIM a(n): p = 1
FOR i = 1 TO n
PRINT "vvedite a("; i; ")";
INPUT a(i)
NEXT
FOR i = 1 TO n
s = s + a(i): p = p * a(i)
NEXT
a = p / s
PRINT "pr="; p
PRINT "summa="; s
PRINT "iskomoe="; a
Тестирование выполнено в программе QB64 ( Скачать )