Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Imports System.Math
- Public Class Form1
- Function mvvod(ByVal t As TextBox)
- Return Val(t.Text)
- End Function
- Sub mvivod(ByVal x As Double, ByVal t As TextBox)
- t.Text = CStr(x)
- End Sub
- Sub mvivodint(ByVal x As Integer, ByVal t As TextBox)
- t.Text = CStr(x)
- End Sub
- Sub novojenova(ByVal x As Double, ByVal z As Double, ByRef y As Double, ByRef n As Integer)
- If (x < 0 And z < 0) Then
- y = x
- If (y > z) Then
- y = z
- End If
- n = 1
- ElseIf (z > 0 And x > 0) Then
- y = x
- If (y < (x + z) ^ (1 / 3)) Then
- y = (x + z) ^ (1 / 3)
- End If
- If (y < Cos(x * z)) Then
- y = Cos(x * z)
- End If
- n = 2
- Else
- y = x + z
- n = 3
- End If
- End Sub
- Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
- Dim x, z, y As Double, n As Double
- x = mvvod(TextBox1)
- z = mvvod(TextBox2)
- novojenova(x, z, y, n)
- mvivod(y, TextBox3)
- mvivodint(n, TextBox4)
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement