Sub pp3()
Dim c(1 To 4) As Single
Dim d(1 To 5) As Single
Dim k As Integer, s1 As Single
Dim s2 As Single
For k = 1 To 4
c(k) = Val(InputBox("Введіть c(" & k & ")"))
Next k
Call srv(c, 4, s1)
For k = 1 To 5
d(k) = Val(InputBox("Введіть d(" & k & ")"))
Next k
Call srv(d, 5, s2)
MsgBox "rez=" & (s1 + s2) / 2
End Sub
Private Sub srv(x() As Single, n As Integer, s As Single)
s = 0
For k = 1 To n
s = s + x(k) ^ 2
Next k
s = Sqr(s)
<== попередня сторінка |
| |
наступна сторінка ==> |
End Sub | | | | Переглядів: 480
Не знайшли потрібну інформацію? Скористайтесь пошуком google:
|
|