Find whether a number is prime or composite.
start:
cls
input "Value: ",number
print "Processing..."
for q=2 to number/2 step 1
q#=q
w#=number/q#
w=w#
if w=w# then goto composite
next q
print number," is a prime number."
wait key
goto start
composite:
print number," is a composite number."
print "First divisable: ",q#
wait key
goto start
Find whether a number is even or odd.
start:
cls
input "Value: ",number
print "Processing..."
q#=number/2.0
q=q#
if q#=q then goto even
print number," is odd."
wait key
goto start
even:
print number," is even."
wait key
goto start
Find whether or not a number is whole.
start:
cls
input "Value: ",number#
print "Processing..."
number=number#
if number#=number then goto even
print number#," is not whole."
wait key
goto start
even:
print number#," is whole."
wait key
goto start
Because of DB's floating point math, these are only accurate up to six figures.

Programs for programmers.