HTBasic Help
×
Menu
Index
ABS Example
 
CLEAR SCREEN
X=-7
PRINT "The absolute value of ";X;"is:";ABS(X) !Takes the absolute value.
PRINT
COMPLEX C
A=4
B=3
C=CMPLX(A,B)
PRINT "The magnitude of the complex number:";A;"+";B;"i"
PRINT "is:";ABS(C) !Takes the magnitude of the complex number.
END