0% found this document useful (0 votes)
49 views2 pages

Form1: "Rezultat Je " "Rezultat Je " "Rezultat Je " "Rezultat Je "

The document describes a Visual Basic program with a form that contains text boxes and radio buttons. The program allows the user to enter two numbers, select an operator, and displays the result. It also includes buttons to clear the fields and close the form.

Uploaded by

Gordan Zivkovic
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views2 pages

Form1: "Rezultat Je " "Rezultat Je " "Rezultat Je " "Rezultat Je "

The document describes a Visual Basic program with a form that contains text boxes and radio buttons. The program allows the user to enter two numbers, select an operator, and displays the result. It also includes buttons to clear the fields and close the form.

Uploaded by

Gordan Zivkovic
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

3.

Public Class Form1


Dim prvibroj As Single
Dim drugibroj As Single
Dim rezultat As Single

Private Sub RadioButton1_CheckedChanged(sender As Object, e As EventArgs) Handles


RadioButton1.CheckedChanged

End Sub

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click


prvibroj = TextBox1.Text
drugibroj = TextBox2.Text
If RadioButton1.Checked = True Then
rezultat = prvibroj + drugibroj
MessageBox.Show("rezultat je " + rezultat.ToString)
ElseIf RadioButton2.Checked = True Then
rezultat = prvibroj * drugibroj
MessageBox.Show("rezultat je " + rezultat.ToString)
ElseIf RadioButton3.Checked = True Then
rezultat = prvibroj / drugibroj
MessageBox.Show("rezultat je " + rezultat.ToString)
Else RadioButton4.Checked = True
rezultat = prvibroj - drugibroj
MessageBox.Show("rezultat je " + rezultat.ToString)
End If
End Sub

Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click


TextBox1.Text = " "
TextBox2.Text = " "

End Sub

Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click


Me.Close()
End Sub
4. Public Class Form1
Dim x As Double
Dim y As Double
Dim n As Double

Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click


Me.Close()
End Sub

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click


x = TextBox1.Text
n = TextBox2.Text
y = x ^ (1 / n)
TextBox3.Text = y
End Sub

Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click


x = TextBox1.Text
n = TextBox2.Text
y = x ^ n
TextBox3.Text

End Sub

Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click


TextBox1.Text = " "
TextBox2.Text = " "
TextBox3.Text = " "
End Sub
End Class

You might also like