Схема алгоритма второй решаемой задачи;
Схема алгоритма второй решаемой задачи;
Программный код первого проекта;
Option Strict On
Option Explicit On
Imports System.Math
Public Class Form1
Function func(ByVal x As Double, ByVal y As Double) As Double
Dim b As Double
b = ((x + y) / (0.2 * x)) ^ (1 / 3) * Sin((Tan(x)) ^ 2)
Return b
End Function
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim x, y, b, i, j As Double
Dim k As Integer
Dim s1, s2 As String
Dim p As Single
x = CDbl(TextBox1.Text)
y = CDbl(TextBox2.Text)
b = func(x, y)
p = CSng(b)
k = CInt(b)
j = Fix(b)
i = Int(b)
s1 = CStr(b)
s2 = CStr(p)
TextBox3.Text = CStr(b)
TextBox4.Text = CStr(k)
TextBox5.Text = CStr(j)
TextBox6.Text = CStr(i)
TextBox7.Text = CStr(p)
TextBox8.Text = CStr(b + p)
TextBox9.Text = CStr(s1 + s2)
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
End
End Sub
End Class
Программный код второго проекта;
Option Strict On
Option Explicit On
Imports System.Math
Public Class Form1
Sub proc(ByVal x As Double, ByVal y As Double, ByRef b As Double)
b = ((x + y) / (0.2 * x)) ^ (1 / 3) * Sin((Tan(x)) ^ 2)
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim x, y, b, i, j As Double
Dim k As Integer
Dim s1, s2 As String
Dim p As Single
x = CDbl(TextBox1.Text)
y = CDbl(TextBox2.Text)
proc(x, y, b)
p = CSng(b)
k = CInt(b)
j = Fix(b)
i = Int(b)
s1 = CStr(b)
s2 = CStr(p)
TextBox3.Text = CStr(b)
TextBox4.Text = CStr(k)
TextBox5.Text = CStr(j)
TextBox6.Text = CStr(i)
TextBox7.Text = CStr(p)
TextBox8.Text = CStr(b + p)
TextBox9.Text = CStr(s1 + s2)
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
End
End Sub
End Class
Программный код третьего проекта;
Option Strict On
Option Explicit On
Imports System.Math
Public Class Form1
Dim x As Double, y As Double, b As Double
Sub proc()
b = ((x + y) / (0.2 * x)) ^ (1 / 3) * Sin((Tan(x)) ^ 2)
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim x, y, b, i, j As Double
Dim k As Integer
Dim s1, s2 As String
Dim p As Single
x = CDbl(TextBox1.Text)
y = CDbl(TextBox2.Text)
proc()
p = CSng(b)
k = CInt(b)
j = Fix(b)
i = Int(b)
s1 = CStr(b)
s2 = CStr(p)
TextBox3.Text = CStr(b)
TextBox4.Text = CStr(k)
TextBox5.Text = CStr(j)
TextBox6.Text = CStr(i)
TextBox7.Text = CStr(p)
TextBox8.Text = CStr(b + p)
TextBox9.Text = CStr(s1 + s2)
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
End
End Sub
End Class
Результаты выполнения проекта.
Доказательство правильности результатов