Tutorial Programming

Tutorial basic, Visual Studio VB.NET 2013 Mathematical Operator 


Hallo sahabat saya akan menjelaskan Mathematical Operator pada visual studio 2013, oke langsung aja

OperatorKeteranganContohHasil
+Penambahan5+27
-Pengurangan5-23
*Perkalian5*210
/Pembagian5/22.5
\Pembagian hasil bulat5\22
ModSisa Pembagian5 Mod 21
^Pemangkatan5 ^ 225
&Penggabungan StringCubo & PertamoCubo Pertamo

Proses urutan perhitungan :
h = 5 * 7 + 3 ^ 2 / 3 - ( 2 + 3 )
h = 5 * 7 + 3 ^ 2 / 3 - 5
h = 5 * 7 + 9 / 3 - 5
h = 35 + 9 / 3 - 5
h = 35 + 3 - 5
h = 38 - 5
h = 33 



Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim num1, num2, difference, product, quotient As Single
num1 = TextBox1.Text
num2 = TextBox2.Text
sum=num1+num2
difference=num1-num2
product = num1 * num2
quotient=num1/num2
Label1.Text=sum
Label2.Text=difference
Label3.Text = product
Label4.Text = quotient
End Sub

Sekian tutorial saya sahabat semoga bermanfaat yah.

No comments:

Post a Comment

Tutorial Programming Designed by Templateism | Ary EJFA Copyright © 2015

Theme images by richcano. Powered by Blogger.