Ok, this is a simple program where you enter a number and it checks to see if it is prime. If it isn't, it also lists all of the factors. Here it is:
Prime_Check:INPUT "Insert a number to see whether its prime: ",PN#
for x = 2 to 9999:If PN#/x = INT(PN#/x) and x<PN#:PRINT "Your number is not prime! It can be divided by ";x;".":PN2#=1:endif:If x=9999 and PN#=2 or x=9999 and PN#>2 and PN2#=0:PRINT "Your number is prime!":endif:If x=9999 and PN#<2:PRINT "This number is neither a prime or constant.":endif:next x
do
suspend for key
gosub Prime_Check
loop
return
It freezes, though, whenever you try to press escape. I can't figure out why. Can anyone help me?