4доп
.docxVB
Private Sub Command1_Click()
Dim F As Single, k As Single, t As Single, Mn As Single, Mk As Single, dM As Single
Dim a As Single, V As Single, M As Single
Const g As Single = 9.81
Mn = InputBox("Введите значение Mn")
Mk = InputBox("Введите значение Mk")
dM = InputBox("Введите значение dM")
F = InputBox("Введите значение F")
k = InputBox("Введите значение k")
t = InputBox(Введите значение t")
M = Mn
Do While M <= Mk
a = (F - k * M * g) / M
V = a * t
Print "a=" & Format(a, "00.") & "V=" & Format(V, 0#) & "M=" & Format(M, 0#)
M = M + dM
Loop
End Sub
2……………………………………………
Private Sub Command1_Click()
Dim a As Single, b As Single, z As Single, xn As Single, xk As Single, dx As Single, yn As Single, yk As Single, dy As Single, x As Single, y As Single
a = InputBox("Введите значение a")
b = InputBox("Введите значение b")
xn = InputBox("Введите значение xn")
xk = InputBox("Введите значение xk")
dx = InputBox("Введите значение dx")
yn = InputBox("Введите значение yn")
yk = InputBox("Введите значение yk")
dy = InputBox("Введите значение dy")
x = xn
y = yn
Do While x <= xk
Do While y <= yk
z = Sqr(a * Sin(x) + b * Cos(y) + 1)
Print "z=" & Format(z, "00.0") & "x=" & Format(x, "00.0") & "y=" & Format(y, "00.0")
x = x + dx
y = y + dy
Loop
Loop
End Sub
Private Sub Command1_Click()
Dim a As Single, b As Single, z As Single, xn As Single, xk As Single, dx As Single, yn As Single, yk As Single, dy As Single, x As Single, y As Single
a = InputBox("Введите значение a")
b = InputBox("Введите значение b")
xn = InputBox("Введите значение xn")
xk = InputBox("Введите значение xk")
dx = InputBox("Введите значение dx")
yn = InputBox("Введите значение yn")
yk = InputBox("Введите значение yk")
dy = InputBox("Введите значение dy")
For x = xn To xk Step dx
For y = yn To yk Step dy
z = Sqr(a * Sin(x) + b * Cos(y) + 1)
Print "z=" & Format(z, "00.0") & "x=" & Format(x, "00.0") & "y=" & Format(y, "00.0")
Next
Next
End Sub
Private Sub CommandButton1_Click()
Dim a As Single, b As Single, z As Single, xn As Single, xk As Single, dx As Single, yn As Single, yk As Single, dy As Single, x As Single, y As Single
a = InputBox("Введите a")
b = InputBox("Введите b")
xn = InputBox("Введите xn")
xk = InputBox("Введите xk")
dx = InputBox("Введите dx")
yn = InputBox("Введите yn")
yk = InputBox("Введите yk")
dy = InputBox("Введите dy")
For x = xn To xk Step dx
For y = yn To yk Step dy
z = Sqr(a * Sin(x) + b * Cos(y) + 1)
Debug.Print "z=" & z & "x=" & x & "y=" & y
Next
Next
End Sub