1+1/2+1/3+1/4+...........+1/100
please give me the code... email the code at emylcleffjules_gregorio@yahoo.comCoding at visual basic programming?
Private Sub Command1_Click()
Dim x As Integer
Dim y As Double
x = 1
Do While x %26lt;= 100
y = y + (1 / x)
x = x + 1
Loop
Text1.Text = y
End Sub
after run the code the text box will display the sum of your calculation
No comments:
Post a Comment