Ответы и объяснения

2012-02-21T04:07:14+00:00

Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim x, y As Double
x = Val(TextBox1.Text)
If (x > 0) Then
y = x ^ 2 - 5 * x
Else
y = 3 * x - 7
End If
TextBox2.Text = y.ToString
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
TextBox1.Text = ""
TextBox2.Text = ""
End Sub
End Class