Sqr: Difference between revisions

From NSB App Studio
Jump to navigation Jump to search
No edit summary
(Add javascript snippet)
Line 5: Line 5:
Sqr returns a double-precision value representing the square root of a number. The required parameter, ''number'', is any valid numeric expression greater than or equal to zero.
Sqr returns a double-precision value representing the square root of a number. The required parameter, ''number'', is any valid numeric expression greater than or equal to zero.


== Example ==
== Example (Basic) ==


<pre>
<pre>
Line 11: Line 11:
'Sqr calculates square root of a number
'Sqr calculates square root of a number
Print "The square root of 69 is " & Sqr(69)
Print "The square root of 69 is " & Sqr(69)
</pre>
== Example (JavaScript) ==
<pre>
// Sqr Example
/* Sqr calculates square root of a number */
NSB.Print("The square root of 69 is " + Math.sqrt(69));
</pre>
</pre>



Revision as of 21:51, 19 May 2013

Sqr(number)

Description

Sqr returns a double-precision value representing the square root of a number. The required parameter, number, is any valid numeric expression greater than or equal to zero.

Example (Basic)

Rem Sqr Example
'Sqr calculates square root of a number
Print "The square root of 69 is " & Sqr(69)

Example (JavaScript)

// Sqr Example
/* Sqr calculates square root of a number */

NSB.Print("The square root of 69 is " + Math.sqrt(69));

Output

The square root of 69 is 8.30662386291807