QB64.com

QB64 is a modern extended BASIC programming language that retains QBasic/QuickBASIC 4.5 compatibility and compiles native binaries for Windows, Linux, and macOS.

The _HYPOT function returns the hypotenuse of a right-angled triangle whose legs are x and y.

Syntax

result! = _HYPOT(x, y)

Parameter(s)

Description

Example(s)


DIM leg_x AS DOUBLE, leg_y AS DOUBLE, result AS DOUBLE
leg_x = 3
leg_y = 4
result = _HYPOT(leg_x, leg_y)
PRINT USING "## , ## and ## form a right-angled triangle."; leg_x; leg_y; result


3 , 4 and 5 form a right-angled triangle.

See Also