1 CLS : PRINT " PRIME NUMBER TESTING PROGRAM" 2 PRINT " by Phillip Bigelow" 3 PRINT : PRINT : PRINT : PRINT "This program can test numbers from one through 16 digits long." 4 PRINT "(testing larger numbers gives unreliable results due to round-off error)":PRINT:PRINT "Note: The computer will appear to hang when large numbers" 5 PRINT "are tested." 6 PRINT "Don't let the long delay upset you! The program is working!" 9 PRINT "Very large numbers can require a few hours to a few days to test.": PRINT : PRINT 10 PRINT : INPUT "What is the number you want to test";Q# 11 CLS 12 PRINT "Program is now running.....To stop program, press (Ctrl) and (Pause) keys" 14 PRINT "simultaneously.": PRINT : PRINT : PRINT "Testing number"; Q# 15 PRINT : PRINT : PRINT 16 LET B$=TIME$ 17 LET X#=2# 20 LET Y#=Q#/X# 21 IF Q#=1 THEN 50 22 IF Q#=2 THEN 50 34 IF Y#=INT(Y#) THEN PRINT "--------------------------RESULTS-------------------------" 35 IF Y#=INT(Y#) THEN PRINT "The number"; Q#; "is NOT prime": PRINT 36 IF Y#=INT(Y#) THEN PRINT "divisible by", X# 38 IF Y#=INT(Y#) THEN 52 39 IF Y#=INT(Y#) THEN 100 41 LET X#=X#+1 42 IF X#>INT((Q#/2)+1) THEN 50 45 GOTO 20 50 PRINT "-------------------------RESULTS--------------------------" 51 PRINT "YOU HAVE A WINNER!", Q#; "Is A PRIME NUMBER!!!" 52 PRINT "Calculation began at = ";B$ 53 PRINT "Calculation ended at = ";TIME$ 54 PRINT "----------------------------------------------------------" 55 PRINT 56 IF Y# = INT(Y#) THEN 39 100 PRINT " MENU":PRINT "Test another number (t), or exit to system/Windows (x)":JH$=INPUT$(1) 101 IF JH$="t" THEN 1 102 IF JH$="x" THEN SYSTEM 103 CLS:GOTO 100