4_3_7_2
4_3_7_2
Option Strict On
Option Explicit On
Imports System.Math
Public Class Form1
' 4.3.7
Dim xx As Double
Dim yy As Double
Dim b_glob As Double
' b_glob
Sub glo_sub()
b_glob = CDbl((0.9 + 283 * Sin(xx ^ 2) + Exp(xx))) / (682.16 * Sin(-yy))
End Sub
' b_sub -SUB
Sub subb(ByVal x As Double, ByVal y As Double, ByRef b_sub As Double)
b_sub = CDbl((0.9 + 283 * Sin(x ^ 2) + Exp(x))) / (682.16 * Sin(-y))
End Sub
' b_fun -FUNCTION
Function func1(ByVal x As Double, ByVal y As Double) As Double
Return CDbl((0.9 + 283 * Sin(x ^ 2) + Exp(x))) / (682.16 * Sin(-y))
End Function
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
'
Dim k As Integer
Dim l As Integer
' -FUNCTION
Dim b_fun As Double
' -SUB
Dim b_sub As Double
Dim y As Double
Dim x As Double
Dim p As Single
Dim k2 As Integer
Dim s1 As String
Dim s2 As String
'
'
x = CDbl(Val(TextBox1.Text))
y = CDbl(Val(TextBox2.Text))
'/////////////////////////////////////////////////////////////////////////////////
' X Y xx yy
xx = x
yy = y
'//////////////////////////////////////////////////////////////////////////////////
'//////////////////////////////////////////////////////////////////////////////////
' b c -FUNCTION
b_fun = func1(x, y)
' b c -SUB
subb(x, y, b_sub)
' b c
glo_sub()
'//////////////////////////////////////////////////////////////////////////////////////
' Double Single
p = CSng(b_fun)
' Double Integer
k2 = CInt(b_fun)
' b :
l = CInt(Fix(b_fun))
k = CInt(Int(b_fun))
' String
|
|
s1 = CStr(b_fun)
s2 = CStr(p)
'
TextBox3.Text = CStr(b_fun)
TextBox4.Text = CStr(k2)
TextBox5.Text = CStr(l)
TextBox6.Text = CStr(k)
TextBox7.Text = CStr(p)
TextBox8.Text = CStr(b_fun + p)
TextBox9.Text = s1 & " + " & s2
' , -FUNCTION, -SUB
TextBox10.Text = CStr(b_fun)
TextBox11.Text = CStr(b_sub)
TextBox12.Text = CStr(b_glob)
End Sub
Private Sub Button3_Click(sender As System.Object, e As System.EventArgs) Handles Button3.Click
' TextBox
TextBox1.Clear()
TextBox2.Clear()
TextBox3.Clear()
TextBox4.Clear()
TextBox5.Clear()
TextBox6.Clear()
TextBox7.Clear()
TextBox8.Clear()
TextBox9.Clear()
TextBox10.Clear()
TextBox11.Clear()
TextBox12.Clear()
End Sub
Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles Button2.Click
Application.Exit()
End Sub
End Class
- 4_3_7_2 FUNCTION