用VB编写程序.计算1+2+3+.+100

问题描述:

用VB编写程序.计算1+2+3+.+100

Private Sub Command1_Click()
Dim s As String,n As Integer,i As Integer
For i = 1 To 100
n = n + i
Next i
Print "1+2+3+……+100=" & n
End Sub