Math Is Fun Forum
  Discussion about math, puzzles, games and fun.   Useful symbols: √ ∞ ≠ ≤ ≥ ≈ ⇒ ∈ Δ θ ∴ ∑ ∫ π -

Login

Username

Password

Not registered yet?

Post a reply

Go back

Write your message and submit
:) :| :( :D :o ;) :/ :P :lol: :mad: :rolleyes: :cool: | :dizzy :eek :kiss :roflol :rolleyes :shame :down :up :touched :sleep :wave :swear :tongue :what :faint :dunno
Options

Go back

Topic review (newest first)

esatpllana
2007-11-23 18:10:34

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

sqrt of number

Code:

math.sqrt("number")

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

Code:

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

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

Code:

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

Code:

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

Code:

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

Code:

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

Code:

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

Code:

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

http://img249.imageshack.us/img249/2946/57799166st0.jpg

have a nice day

Board footer

Powered by FluxBB