39 lines
646 B
Plaintext
39 lines
646 B
Plaintext
SUB process(x)
|
|
LET sum = sum + abs(x)
|
|
IF abs(prod) < (2 ^ 27) and x <> 0 then LET prod = prod * x
|
|
END SUB
|
|
|
|
LET prod = 1
|
|
LET sum = 0
|
|
LET x = 5
|
|
LET y = -5
|
|
LET z = -2
|
|
LET one = 1
|
|
LET three = 3
|
|
LET seven = 7
|
|
|
|
FOR j = -three to (3 ^ 3) step three
|
|
CALL process(j)
|
|
NEXT j
|
|
FOR j = -seven To seven Step x
|
|
CALL process(j)
|
|
NEXT j
|
|
FOR j = 555 to 550 - y
|
|
CALL process(j)
|
|
NEXT j
|
|
FOR j = 22 to -28 step -three
|
|
CALL process(j)
|
|
NEXT j
|
|
FOR j = 1927 to 1939
|
|
CALL process(j)
|
|
NEXT j
|
|
FOR j = x to y step z
|
|
CALL process(j)
|
|
NEXT j
|
|
FOR j = (11 ^ x) to (11 ^ x) + one
|
|
CALL process(j)
|
|
NEXT j
|
|
PRINT " sum= "; sum
|
|
PRINT "prod= "; prod
|
|
END
|