Private Sub Command1_Click()
Cls
Font.Size = 30
Print f(100)
End Sub
Private Function f(x As Integer) As Long
If x = 1 Then
f = x
Else
f = x + f(x - 1)
End If
End Function
Cls
Font.Size = 30
Print f(100)
End Sub
Private Function f(x As Integer) As Long
If x = 1 Then
f = x
Else
f = x + f(x - 1)
End If
End Function