Advertisement
Guest User

Untitled

a guest
Jun 21st, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     Dim x, y, f, sum As Double
  2.     Dim i As Integer
  3.    
  4.     x = 1
  5.     y = 3
  6.     sum = 0
  7.    
  8.     For i = 1 To 13
  9.         f = x / y
  10.         x = y
  11.         y = y + 2
  12.         If i Mod 2 = 1 Then
  13.             f = -f
  14.         End If
  15.        
  16.         sum = sum + f
  17.     Next i
  18.    
  19.     Range("A1").Value = sum
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement