25 lines
666 B
Plaintext
25 lines
666 B
Plaintext
Dim Shared As Long prod, sum
|
|
|
|
Sub process(x As Long)
|
|
sum += Abs(x)
|
|
If Abs(prod) < (2 ^ 27) And x <> 0 Then prod *= x
|
|
End Sub
|
|
|
|
Dim j As Long
|
|
prod = 1
|
|
sum = 0
|
|
Dim As Integer x = 5, y = -5, z = -2
|
|
Dim As Integer 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 Using " sum= ###,###"; sum
|
|
Print Using "prod= ####,###,###"; prod
|
|
Sleep
|