pi = 3.14159265 for n = -90 to 90 step 10 value = sin(n * pi / 180) absvalue = abs(value) print "The absolute value of "; value;_ " is "; absvalue nextproduces
The absolute value of -1 is 1 The absolute value of -.9848077 is .9848077 The absolute value of -.9396926 is .9396926 The absolute value of -.8660254 is .8660254 The absolute value of -.7660444 is .7660444 The absolute value of -.6427876 is .6427876 The absolute value of -.5 is .5 The absolute value of -.3420201 is .3420201 The absolute value of -.1736482 is .1736482 The absolute value of 0 is 0 The absolute value of .1736482 is .1736482 The absolute value of .3420201 is .3420201 The absolute value of .5 is .5 The absolute value of .6427876 is .6427876 The absolute value of .7660444 is .7660444 The absolute value of .8660254 is .8660254 The absolute value of .9396926 is .9396926 The absolute value of .9848077 is .9848077 The absolute value of 1 is 1
from The Basmark QuickBASIC Programmer’s Manual by Lawrence Leinweber