Home » Personal collection » Commodore tapes » Commodore_16 » drawer_br_tape07a_c16_d90_ages_b.wav » prime numbers

prime numbers

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Personal collection » Commodore tapes » Commodore_16 » drawer_br_tape07a_c16_d90_ages_b.wav
Filename: prime numbers
Read OK:
File size: 0241 bytes
Load address: 1001
Exec address: 0000
Duplicates

There is 1 duplicate copy of this file in the archive:

File contents
    10 SCNCLR
    20 INPUT"WHAT NUMBER(5 OR ABOVE)";A%
    25 IF INT(A%/2)=A%/2 THEN 200
    27 IF A%<5 THEN 250
    30 PRINT:PRINT:PRINT:PRINT:PRINT"PLEASE WAIT..."
    40 B=3
    50 IF INT(A%/B)=A%/B THEN 80
    60 IF B>A%/2 THEN 90
    70 B=B+2:GOTO 50
    80 PRINT"<cursor up>              <cursor left><cursor left><cursor left><cursor left><cursor left><cursor left><cursor left><cursor left><cursor left><cursor left><cursor left><cursor left><cursor left><cursor left>";A%;"ISN'T A PRIME NUMBER.":GOTO 100
    90 PRINT"<cursor up>              <cursor left><cursor left><cursor left><cursor left><cursor left><cursor left><cursor left><cursor left><cursor left><cursor left><cursor left><cursor left><cursor left><cursor left>";A%;"IS A PRIME NUMBER."
   100 PRINT:PRINT:PRINT"DO YOU WANT TO TEST ANOTHER NUMBER(Y/N)?"
   110 GETKEY A$:IF A$="Y" THEN GOTO 10
   120 IF A$="N" THEN SCNCLR:END
   130 GOTO 110
   200 PRINT:PRINT:PRINT:PRINT:PRINT"ODD NUMBERS ONLY PLEASE!"
   210 PRINT:PRINT"PRESS ANY KEY."
   220 GETKEY A$
   230 GOTO 10
   250 PRINT:PRINT:PRINT:PRINT:PRINT"5 OR ABOVE PLEASE!"
   260 PRINT:PRINT"PRESS ANY KEY."
   270 GETKEY A$
   280 GOTO 10


�)�"WHAT NUMBER(5 OR ABOVE)";A%B� �(A%�2)�A%�2 � 200S� A%�5 � 250q�:�:�:�:�"PLEASE WAIT..."y(B�3�2� �(A%�B)�A%�B � 80�<� B�A%�2 � 90�FB�B�2:� 50�P�"�              ��������������";A%;"ISN'T A PRIME NUMBER.":� 1005Z�"�              ��������������";A%;"IS A PRIME NUMBER."id�:�:�"DO YOU WANT TO TEST ANOTHER NUMBER(Y/N)?"�n�� A$:� A$�"Y" � � 10�x� A$�"N" � �:���� 110���:�:�:�:�"ODD NUMBERS ONLY PLEASE!"���:�"PRESS ANY KEY."���� A$��� 10��:�:�:�:�"5 OR ABOVE PLEASE!"-�:�"PRESS ANY KEY."7�� A$@� 10
GPJ@.@)PT@."what number(5 or above)";a%@bPY@. .(a%.2).a%.2 . 200@sP[@. a%.5 . 250@QP.@.:.:.:.:."please wait..."@YP(@b.3@.P2@. .(a%.b).a%.b . 80@.P<@. b.a%.2 . 90@.Pf@b.b.2:. 50@.Pp@.".              ..............";a%;"isn't a prime number.":. 100@5Qz@.".              ..............";a%;"is a prime number."@IQD@.:.:."do you want to test another number(y/n)?"@.QN@.. a$:. a$."y" . . 10@.QX@. a$."n" . .:.@.Q.@. 110@.Q.@.:.:.:.:."odd numbers only please!"@.Q.@.:."press any key."@.Q.@.. a$@.Q.@. 10@UR.@.:.:.:.:."5 or above please!"@-RDA.:."press any key."@7RNA.. a$@@RXA. 10@@@
00000000  07 10 0a 00 e8 00 29 10  14 00 85 22 57 48 41 54  |......)...."WHAT|
00000010  20 4e 55 4d 42 45 52 28  35 20 4f 52 20 41 42 4f  | NUMBER(5 OR ABO|
00000020  56 45 29 22 3b 41 25 00  42 10 19 00 8b 20 b5 28  |VE)";A%.B.... .(|
00000030  41 25 ad 32 29 b2 41 25  ad 32 20 a7 20 32 30 30  |A%.2).A%.2 . 200|
00000040  00 53 10 1b 00 8b 20 41  25 b3 35 20 a7 20 32 35  |.S.... A%.5 . 25|
00000050  30 00 71 10 1e 00 99 3a  99 3a 99 3a 99 3a 99 22  |0.q....:.:.:.:."|
00000060  50 4c 45 41 53 45 20 57  41 49 54 2e 2e 2e 22 00  |PLEASE WAIT...".|
00000070  79 10 28 00 42 b2 33 00  91 10 32 00 8b 20 b5 28  |y.(.B.3...2.. .(|
00000080  41 25 ad 42 29 b2 41 25  ad 42 20 a7 20 38 30 00  |A%.B).A%.B . 80.|
00000090  a3 10 3c 00 8b 20 42 b1  41 25 ad 32 20 a7 20 39  |..<.. B.A%.2 . 9|
000000a0  30 00 b2 10 46 00 42 b2  42 aa 32 3a 89 20 35 30  |0...F.B.B.2:. 50|
000000b0  00 f8 10 50 00 99 22 91  20 20 20 20 20 20 20 20  |...P..".        |
000000c0  20 20 20 20 20 20 9d 9d  9d 9d 9d 9d 9d 9d 9d 9d  |      ..........|
000000d0  9d 9d 9d 9d 22 3b 41 25  3b 22 49 53 4e 27 54 20  |....";A%;"ISN'T |
000000e0  41 20 50 52 49 4d 45 20  4e 55 4d 42 45 52 2e 22  |A PRIME NUMBER."|
000000f0  3a 89 20 31 30 30 00 35  11 5a 00 99 22 91 20 20  |:. 100.5.Z..".  |
00000100  20 20 20 20 20 20 20 20  20 20 20 20 9d 9d 9d 9d  |            ....|
00000110  9d 9d 9d 9d 9d 9d 9d 9d  9d 9d 22 3b 41 25 3b 22  |..........";A%;"|
00000120  49 53 20 41 20 50 52 49  4d 45 20 4e 55 4d 42 45  |IS A PRIME NUMBE|
00000130  52 2e 22 00 69 11 64 00  99 3a 99 3a 99 22 44 4f  |R.".i.d..:.:."DO|
00000140  20 59 4f 55 20 57 41 4e  54 20 54 4f 20 54 45 53  | YOU WANT TO TES|
00000150  54 20 41 4e 4f 54 48 45  52 20 4e 55 4d 42 45 52  |T ANOTHER NUMBER|
00000160  28 59 2f 4e 29 3f 22 00  83 11 6e 00 a1 f9 20 41  |(Y/N)?"...n... A|
00000170  24 3a 8b 20 41 24 b2 22  59 22 20 a7 20 89 20 31  |$:. A$."Y" . . 1|
00000180  30 00 96 11 78 00 8b 20  41 24 b2 22 4e 22 20 a7  |0...x.. A$."N" .|
00000190  20 e8 3a 80 00 a0 11 82  00 89 20 31 31 30 00 c8  | .:....... 110..|
000001a0  11 c8 00 99 3a 99 3a 99  3a 99 3a 99 22 4f 44 44  |....:.:.:.:."ODD|
000001b0  20 4e 55 4d 42 45 52 53  20 4f 4e 4c 59 20 50 4c  | NUMBERS ONLY PL|
000001c0  45 41 53 45 21 22 00 e0  11 d2 00 99 3a 99 22 50  |EASE!"......:."P|
000001d0  52 45 53 53 20 41 4e 59  20 4b 45 59 2e 22 00 ea  |RESS ANY KEY."..|
000001e0  11 dc 00 a1 f9 20 41 24  00 f3 11 e6 00 89 20 31  |..... A$...... 1|
000001f0  30 00 15 12 fa 00 99 3a  99 3a 99 3a 99 3a 99 22  |0......:.:.:.:."|
00000200  35 20 4f 52 20 41 42 4f  56 45 20 50 4c 45 41 53  |5 OR ABOVE PLEAS|
00000210  45 21 22 00 2d 12 04 01  99 3a 99 22 50 52 45 53  |E!".-....:."PRES|
00000220  53 20 41 4e 59 20 4b 45  59 2e 22 00 37 12 0e 01  |S ANY KEY.".7...|
00000230  a1 f9 20 41 24 00 40 12  18 01 89 20 31 30 00 00  |.. A$.@.... 10..|
00000240  00                                                |.|
00000241