17.07.2013 Views

GWBASIC User's Manual

GWBASIC User's Manual

GWBASIC User's Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

GW-BASIC <strong>User's</strong> Guide<br />

SQR Function<br />

Purpose:<br />

Returns the square root of x.<br />

Syntax:<br />

SQR(x)<br />

Comments:<br />

x must be greater than or equal to 0.<br />

SQR(x) is computed in single-precision unless the /d switch is used when GW-BASIC is<br />

executed.<br />

Examples:<br />

10 FOR X=10 TO 25 STEP 5<br />

20 PRINT X; SQR(X)<br />

30 NEXT<br />

RUN<br />

10 3.162278<br />

15 3.872984<br />

20 4.472136<br />

25 5<br />

file:///C|/Documents%20and%20Settings/Lorenzo/Desktop/GW%20Basic/SQR.html28/03/2004 21.29.47

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!