daily pastebin goal
8%
SHARE
TWEET

Untitled

a guest Mar 22nd, 2019 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Sub var1()
  2.  
  3. Dim f, t, p, b As Double
  4. Dim d, c, y As Double
  5.  
  6. Dim i As Integer
  7. Dim x() As Variant
  8.  
  9. d = 1.89
  10. c = 0.4
  11. y = 1.6
  12.    
  13. x = Array(0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5, 5)
  14.  
  15. For i = 0 To 9
  16.  
  17.     If x(i) > b Then
  18.         t = (Cos(x(i)) ^ 2 + Sin(b))
  19.     ElseIf x(i) <= b Then
  20.         t = Atn(x(i)) + b
  21.     End If
  22.  
  23.     f = t ^ 2 + Sin(x(i)) ^ 2
  24.    
  25.     p = f + Sqr(18.45) * Sin(c) + t
  26.  
  27.     b = (Log(x(i)) ^ 2 + d * y) / (Sin(c) + Cos(d))
  28.  
  29.     MsgBox "x(" & i & ")=" & x(i) & Chr(10) & Chr(10) & "t = " & t & Chr(10) & "p = " & p & Chr(10) & "f = " & f & Chr(10) & "b = " & b
  30. Next i
  31. End Sub
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top