22 lines
607 B
Plaintext
22 lines
607 B
Plaintext
sub process(x)
|
|
sum = sum + abs(x)
|
|
if abs(prod) < (2 ^ 27) and x <> 0 then prod = prod * x : fi
|
|
end sub
|
|
|
|
prod = 1
|
|
sum = 0
|
|
x = 5 : y = -5 : z = -2
|
|
one = 1 : three = 3 : seven = 7
|
|
|
|
for j = -three to (3 ^ 3) step three: process(j): next j
|
|
for j = -seven to seven step x: process(j): next j
|
|
for j = 555 to 550 - y: process(j): next j
|
|
for j = 22 to -28 step -three: process(j): next j
|
|
for j = 1927 to 1939: process(j): next j
|
|
for j = x to y step z: process(j): next j
|
|
for j = (11 ^ x) to (11 ^ x) + one: process(j): next j
|
|
|
|
print " sum= ", sum using "###,###"
|
|
print "prod= ", prod using "####,###,###"
|
|
end
|