Sub ciąg() f = 1 a = 1 i = 0 Range("A1") = f Range("A2") = a k = f + a While k <= 100 Range("A3").Offset(i, 0) = k f = a a = k k = f + a i = i + 1 Wend End Sub
Sub ijk() s = 1 n = 2 m = 3 p = 3
For i = 1 To n For j = 1 To m For k = 1 To p s = s + i * k + j Next k Next j Next i
Range("A1") = s
End Sub
Sub pięć() s = 0 i = 1 n = 2 m = 3
For i = 1 To n p = 1 j = 1 For j = 1 To m p = p * (i + j) * i * j Next j s = s + p Next i Range("A1") = s