29 lines
612 B
Text
29 lines
612 B
Text
V prod = 1
|
||
V s = 0
|
||
|
||
-V
|
||
x = +5
|
||
y = -5
|
||
z = -2
|
||
one = 1
|
||
three = 3
|
||
seven = 7
|
||
|
||
F body(j)
|
||
:s += abs(j)
|
||
I abs(:prod) < 2 ^ 27 & j != 0
|
||
:prod *= j
|
||
|
||
L(j) (-three .. 3 ^ 3).step(three) {body(j)}
|
||
L(j) (-seven .. seven).step(x) {body(j)}
|
||
L(j) 555 .. 550 - y {body(j)}
|
||
L(j) (22 .. -28).step(-three) {body(j)}
|
||
L(j) 1927 .. 1939 {body(j)}
|
||
L(j) (x .. y).step(z) {body(j)}
|
||
L(j) 11 ^ x .. 11 ^ x + one {body(j)}
|
||
|
||
V ss = String(s)
|
||
V ps = String(prod)
|
||
V m = max(ss.len, ps.len)
|
||
print(‘ sum = ’ss.rjust(m))
|
||
print(‘prod = ’ps.rjust(m))
|