DEFDBL M-Y
CLS
INPUT "Vvedite kol-vo chlenov ryada: ", n
m = 1: y = 1
FOR i = 0 TO n - 1
y = y * (3 ^ ((3 - i) * m) + (-m * 2 ^ i))
m = -m
NEXT
PRINT "Y = "; INT(y)
DEFDBL M-Y
CLS
INPUT "Vvedite kol-vo chlenov ryada: ", n
m = 1: y = 1
FOR i = 0 TO n - 1
y = y * (3 ^ ((3 - i) * m) + (-m * 2 ^ i))
m = -m
NEXT
PRINT "Y = "; INT(y)