Math Is Fun Forum

  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 2007-11-22 19:10:34

esatpllana
Member
Registered: 2007-11-22
Posts: 12

some math codes using vb.net

hi there I'm using Visual Studio 2005(visual Basic)
I'll tell you  some codes

sqrt of number

math.sqrt("number")

we can insert one textbox with name txtnum
and in code to write this

dim n as integer
n = val(txtnum.text)
msgbox(math.sqrt(n))

Adding number
insert to textboxes 1.txtnum1 , 2. txtnum2

dim a,b as integer
a = val(txtnum1.text)
b = val(txtnum2.text)
msgbox(a+b)

Subtracting Numbers
insert to textboxes 1.txtnum1 , 2. txtnum2

dim a,b as integer
a = val(txtnum1.text)
b = val(txtnum2.text)
msgbox(a-b)

Subtracting Numbers
insert to textboxes 1.txtnum1 , 2. txtnum2

dim a,b as integer
a = val(txtnum1.text)
b = val(txtnum2.text)
msgbox(a-b)

Multiplying Numbers
insert to textboxes 1.txtnum1 , 2. txtnum2

dim a,b as integer
a = val(txtnum1.text)
b = val(txtnum2.text)
msgbox(a*b)

Dividing Numbers
insert to textboxes 1.txtnum1 , 2. txtnum2

dim a,b as integer
a = val(txtnum1.text)
b = val(txtnum2.text)
msgbox(a/b)

Squaring Numbers
insert to textboxes 1.txtnum1 , 2. txtnum2

dim a,b as integer
a = val(txtnum1.text)
b = val(txtnum2.text)
msgbox(a^b)

57799166st0.jpg

have a nice day


live your day
Mitrovica My City
tenth a class

Offline

Board footer

Powered by FluxBB