#### Revision [9969]

This is an old revision of KeyPgSqr made by JeffMarshall on 2007-07-24 05:48:53.

### SQR

Returns a square root of a number

**Syntax:**

**Usage:**

result =

**Sqr**(*number*)**Parameters:**

*number*
the number (greater than or equal to zero)

**Return Value:**

Returns the square root of the argument

`.`*number*
If

`equals zero,`*number***Sqr**returns zero.
If

`is less than zero,`*number***Sqr**returns a domain error (-1.#IND).**Description:**

This is the same as raising the argument

*number*to the one-half power ( ^ 1/2). The required`argument can be any valid numeric expression greater than zero.`*number***Examples:**

Dim a As Single

Dim b As Single

Input "Please enter one side of a right triangle: ",a

Input "Please enter another side of a right triangle: ",b

Print ""

Print "The hypotenuse of the triangle has a length of"; Sqr ( a * a + b * b )

Sleep

Dim b As Single

Input "Please enter one side of a right triangle: ",a

Input "Please enter another side of a right triangle: ",b

Print ""

Print "The hypotenuse of the triangle has a length of"; Sqr ( a * a + b * b )

Sleep

The output would look like:

Please enter one side of a Right triangle: 3 Please enter another side of a Right triangle: 4 The hypotenuse of the triangle has a length of 5

**Differences from QB:**

- None

**See also:**

Back to Math