Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Imports System.Math
Public Class Form1
Dim Danni1, Danni2 As Double 'Zadavane na promenlivi
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
On Error Resume Next
Danni1 = Input1.Text 'Promenlivi
Danni2 = Input2.Text
If RadioButton1.Checked = True Then 'Sabirane
Output.Text = Danni1 + Danni2
End If
If RadioButton2.Checked = True Then 'Izvajdane Output.Text = Danni1 - Danni2
End If
If RadioButton3.Checked = True Then 'Umnojenie
Output.Text = Danni1 * Danni2
End If
If RadioButton4.Checked = True Then 'Delenie
Output.Text = Danni1 / Danni2
End If
If RadioButton4.Checked = True Then 'Stepen
Output.Text = Danni1 ^ Danni2
End If
If RadioButton6.Checked = True Then 'Koren
Output.Text = Sqrt(Danni1)
End If
If RadioButton7.Checked = True Then 'celo4isleno delenie
Output.Text = Danni1 \ Danni2
End If
If RadioButton8.Checked = True Then 'Delenie s ostatuk MOD
Output.Text = Danni1 Mod Danni2
End If
If RadioButton9.Checked = True Then 'Namirane na %
Output.Text = (Danni1 * Dani2) / 100 End If
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
End
End Sub
End Class
Това мнение е редактирано от gorgi1111 на 04.05.2008 08:17