Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Imports System.Math
- Public Class Form1
- Function mvod(ByVal T As TextBox)
- Return (T.Text)
- End Function
- Overloads Sub mvivod(ByVal l As Double, ByVal T As TextBox)
- T.Text = CStr(l)
- End Sub
- Overloads Sub mvivod(ByVal n As Integer, ByVal T As TextBox)
- T.Text = CStr(n)
- End Sub
- Sub msub(ByRef l As Double, ByRef n As Integer, ByVal x As Double, ByVal a As Double)
- Dim del, ka, si, pa, d As Double
- del = (x - a) / x
- ka = a ^ (1 / 2) + x
- si = (Sin(x)) ^ 2
- pa = Pow(a, x)
- If (x <= 1) And (x >= 0) Then
- l = del
- If (l > ka) Then
- l = ka
- End If
- If (l > si) Then
- l = si
- End If
- n = 1
- Else
- If x < 0 Then
- l = x
- If (l < pa) Then
- l = pa
- End If
- n = 2
- Else
- n = 3
- l = 0
- End If
- End If
- End Sub
- Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
- Dim x, a, l As Double
- Dim n As Integer
- x = mvod(TextBox1)
- a = mvod(TextBox2)
- msub(l, n, x, a)
- mvivod(l, TextBox3)
- mvivod(n, TextBox4)
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement