Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Dim n As Integer
- n = 5
- ReDim T0(1 To n) As Double
- ReDim T1(1 To n) As Double
- ReDim p0(1 To n) As Double
- ReDim p1(1 To n) As Double
- Dim rT0, rT1, rT10, rJtp, rJp As Double
- T0(1) = 8564.3
- T0(2) = 24384.5
- T0(3) = 17562.4
- T0(4) = 354.7
- T0(5) = 15458.4
- T1(1) = 12835.4
- T1(2) = 25856.7
- T1(3) = 18124.2
- T1(4) = 425.6
- T1(5) = 17681.3
- p0(1) = 43.5
- p0(2) = 168.3
- p0(3) = 361.2
- p0(4) = 15.6
- p0(5) = 261.5
- p1(1) = 51.5
- p1(2) = 215.4
- p1(3) = 415.2
- p1(4) = 18.4
- p1(5) = 165.2
- Dim i As Integer
- For i = 1 To n
- rT0 = rT0 + T0(i)
- Next
- For i = 1 To n
- rT1 = rT1 + T1(i)
- Next
- For i = 1 To n
- rT10 = rT10 + T1(i) / (p1(i) / p0(i))
- Next
- rJtp = rT1 / rT0
- rJp = rT1 / rT10
- MsgBox CStr(rT0) + " " + CStr(rT1) + " " + CStr(rT10) + " " + CStr(rJtp) + " " + CStr(rJp)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement