Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save MarmaladeKnight/bd190f581d27d861a0581614ff877928 to your computer and use it in GitHub Desktop.
Save MarmaladeKnight/bd190f581d27d861a0581614ff877928 to your computer and use it in GitHub Desktop.
Option Explicit On
Option Strict On
Imports System.Math
Public Class Form1
Function vvod(ByVal Input As TextBox) As Double
Return CDbl(Input.Text)
End Function
'Function countValue(ByVal a As Double, ByVal b As Double, ByVal c As Double, ByVal x As Double) As Double
'Return a * x ^ 2 + b * x + c
'End Function
Sub countValue(ByVal a As Double, ByVal b As Double, ByVal c As Double, ByVal x As Double, ByRef tmp As Double)
tmp = a * x ^ 2 + b * x + c
End Sub
Sub vivod(ByVal variable As Double, ByVal Label As Label)
Label.Text += CStr(variable)
End Sub
Private Sub Count_Click(sender As Object, e As EventArgs) Handles Count.Click
Dim x, y, z, tmp As Double
x = vvod(xInput)
countValue(2.56, 3.4, 8.1, x, tmp)
y = tmp
countValue(3.6, 0, -5.2, x, tmp)
y /= tmp
'y = countValue(2.56, 3.4, 8.1, x, y) / countValue(3.6, 0, -5.2, x, y)
vivod(y, yLabel)
countValue(0, 7, 2 * Math.PI, x, tmp)
z = tmp
countValue(3.6, 0, -2, x, tmp)
z /= tmp
'z = countValue(3.6, 0, -2, x) / countValue(0, 7, 2 * Math.PI, x)
vivod(z, zLabel)
End Sub
Private Sub ExitButton_Click(sender As Object, e As EventArgs) Handles ExitButton.Click
Me.Close()
End Sub
End Class
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment