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

You are not logged in.

## #1 2007-11-23 18:10:34

esatpllana
Member

Offline

### 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

#### 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))```

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)```

have a nice day