Помогите пожалуйста составить блок-схемы к программам VBA
1)множественное ветвление:
Private Sub CommandButton1_Click()
Dim f, y, z As Single
x = Val(TextBox1.Text)
z = (Abs(z - 2 - Sin(x))) ^ (1 \ 2)
If x >= 5 Then y = z * Sin(x - 1)
If x < 5 And x >= 0 Then y = z * (x - 1)
If x < 0 Then y = Cos(Abs(x) * z)
f = y + Log(Abs(10 - (x ^ 2) - x))
Label2.Caption = "f= " + Str(f)
End Sub
2)ветвление:
Dim a, b, c As Double
Private Sub CommandButton1_Click()
a = Mid(CSng(TextBox1.Text), 1, 1)
b = Mid(CSng(TextBox1.Text), 2, 1)
c = Mid(CSng(TextBox1.Text), 3, 1)
If a = b Then f = f + 1
If a = c Then f = f + 1
If b = c Then f = f + 1
If f = 1 Then f = f + 1
Label1.Caption = f
End Sub
Private Sub Label1_Click()
End Sub
Private Sub TextBox1_Change()
End Sub
буду очень благодарен)
1)множественное ветвление:
Private Sub CommandButton1_Click()
Dim f, y, z As Single
x = Val(TextBox1.Text)
z = (Abs(z - 2 - Sin(x))) ^ (1 \ 2)
If x >= 5 Then y = z * Sin(x - 1)
If x < 5 And x >= 0 Then y = z * (x - 1)
If x < 0 Then y = Cos(Abs(x) * z)
f = y + Log(Abs(10 - (x ^ 2) - x))
Label2.Caption = "f= " + Str(f)
End Sub
2)ветвление:
Dim a, b, c As Double
Private Sub CommandButton1_Click()
a = Mid(CSng(TextBox1.Text), 1, 1)
b = Mid(CSng(TextBox1.Text), 2, 1)
c = Mid(CSng(TextBox1.Text), 3, 1)
If a = b Then f = f + 1
If a = c Then f = f + 1
If b = c Then f = f + 1
If f = 1 Then f = f + 1
Label1.Caption = f
End Sub
Private Sub Label1_Click()
End Sub
Private Sub TextBox1_Change()
End Sub
буду очень благодарен)