Home » Archimedes archive » Micro User » MU 1990-02.adf » C/BUSES

C/BUSES

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 » Archimedes archive » Micro User » MU 1990-02.adf
Filename: C/BUSES
Read OK:
File size: 06B7 bytes
Load address: FFFFFB42
Exec address: 181D2E33
Duplicates

There are 2 duplicate copies of this file in the archive:

File contents
   10MODE 7
   20PROCcopies
   30DIM Bus$(8)
   40DIM Number(8)
   50DIM Quest$(6)
   60DIM Price(8)
   70QN=0
   80REPEAT
   90QN=QN+1
  100PROCSetup
  110PROCMessage
  120N=0
  130REPEAT
  140N=N+1
  150PROCinit
  160PROCprint
  170UNTIL N=10
  172VDU2
  176VDU3
  180UNTIL QN=QC
  190 
  200END
  210 
  220 
  230 
  240 
  250 
  260DEFPROCcopies
  270INPUT''"How many copies do you want?   "QC
  280CLS
  290ENDPROC
  300 
  310DEFPROCSetup
  320FOR X=1 TO 8
  330 READ Bus$(X)
  335 Price(X)=RND(2000)
  340 Price(X)=(Price(X)/100)+50
  345 Number(X)=RND(12)
  346 Number(X)=Number(X)+40
  350NEXT X
  390FOR Z=1 TO 6
  400 READ Quest$(Z)
  410NEXT Z
  415RESTORE
  420ENDPROC
  430 
  440 
  450DEFPROCMessage
  451VDU2
  460PRINT TAB(10)QN;:PRINT TAB(65)QN
  470PRINT'"These are problems for you to work on."'"Read them carefully and answer BOTH questions."''"COACH COMPANIES ----- PRICE LIST"'"--------------------------------"
  475J=0
  490 FOR H=1 TO 8
  495J=J+1
  499@%=131594
  500PRINT Bus$(J);" charge #";Price(J);" for a coach with ";
  502@%=10
  505PRINT;Number(J);" seats."
  510NEXT H
  530PRINT
  531VDU3
  540ENDPROC
  550 
  560 
  570 
  580 
  590 
  600DEFPROCinit
  610 a=RND(8)
  611q=RND(6)
  612E=RND(20):B=RND(9)
  620Answer=Price(a)*B
  630ANS=(Number(a)*B)-E
  650ENDPROC
  660 
  670 
  680 
  690 
  700DEFPROCprint
  701VDU2
  710PRINT"For the school trip the head booked ";B;" coaches"'"from ";Bus$(a);". All the coaches were full except one which"
  720PRINT"had ";E;" seats empty. How many people went on the trip? _____";:PRINT TAB(72);ANS
  725@%=131594
  730PRINT Quest$(q);" #________";:PRINT TAB(72)"#";Answer:PRINT
  732@%=10
  735VDU3
  740ENDPROC
10000DATA"Ayreville Coaches","Western National"
11000DATA"Tamar Coach Company","Lethbridge Travel"
12000DATA"Martin and Ross Buses","Parks of Plymouth"
13000DATA"Humphries Coaches","The Major Bus Company"
15000DATA "How much did the school spend on the trip?"
15100DATA "How much did it all cost?"
15200DATA "How much money would be needed?"
15300DATA "How much was it altogether?"
15400DATA "What was the total cost?"
15500DATA "What was the total amount needed?"

� 7
�copies

� Bus$(8)
(� Number(8)
2� Quest$(6)
<� Price(8)
FQN=0
P�
ZQN=QN+1
d
�Setup
n�Message
xN=0
��
�	N=N+1
�	�init
�
�print
�
� N=10
��2
��3
�� QN=QC
� 
��
� 
� 
� 
� 
� 
��copies
*�''"How many copies do you want?   "QC
�
"�
, 
6��Setup
@
� X=1 � 8
J � Bus$(X)
O Price(X)=�(2000)
T Price(X)=(Price(X)/100)+50
Y Number(X)=�(12)
Z Number(X)=Number(X)+40
^� X
�
� Z=1 � 6
� � Quest$(Z)
�� Z
��
��
� 
� 
�
��Message
��2
�� �10)QN;:� �65)QN
֦�'"These are problems for you to work on."'"Read them carefully and answer BOTH questions."''"COACH COMPANIES ----- PRICE LIST"'"--------------------------------"
�J=0
� � H=1 � 8
�	J=J+1
�
@%=131594
�8� Bus$(J);" charge #";Price(J);" for a coach with ";
�	@%=10
��;Number(J);" seats."
�� H
�
�3
�
& 
0 
: 
D 
N 
X
��init
b a=�(8)
c
q=�(6)
dE=�(20):B=�(9)
lAnswer=Price(a)*B
vANS=(Number(a)*B)-E
��
� 
� 
� 
� 
���print
��2
�w�"For the school trip the head booked ";B;" coaches"'"from ";Bus$(a);". All the coaches were full except one which"
�Q�"had ";E;" seats empty. How many people went on the trip? _____";:� �72);ANS
�
@%=131594
�0� Quest$(q);" #________";:� �72)"#";Answer:�
�	@%=10
��3
��
'+�"Ayreville Coaches","Western National"
*�.�"Tamar Coach Company","Lethbridge Travel"
.�0�"Martin and Ross Buses","Parks of Plymouth"
2�0�"Humphries Coaches","The Major Bus Company"
:�2� "How much did the school spend on the trip?"
:�!� "How much did it all cost?"
;`'� "How much money would be needed?"
;�#� "How much was it altogether?"
<( � "What was the total cost?"
<�)� "What was the total amount needed?"
�
00000000  0d 00 0a 07 eb 20 37 0d  00 14 0b f2 63 6f 70 69  |..... 7.....copi|
00000010  65 73 0d 00 1e 0d de 20  42 75 73 24 28 38 29 0d  |es..... Bus$(8).|
00000020  00 28 0f de 20 4e 75 6d  62 65 72 28 38 29 0d 00  |.(.. Number(8)..|
00000030  32 0f de 20 51 75 65 73  74 24 28 36 29 0d 00 3c  |2.. Quest$(6)..<|
00000040  0e de 20 50 72 69 63 65  28 38 29 0d 00 46 08 51  |.. Price(8)..F.Q|
00000050  4e 3d 30 0d 00 50 05 f5  0d 00 5a 0b 51 4e 3d 51  |N=0..P....Z.QN=Q|
00000060  4e 2b 31 0d 00 64 0a f2  53 65 74 75 70 0d 00 6e  |N+1..d..Setup..n|
00000070  0c f2 4d 65 73 73 61 67  65 0d 00 78 07 4e 3d 30  |..Message..x.N=0|
00000080  0d 00 82 05 f5 0d 00 8c  09 4e 3d 4e 2b 31 0d 00  |.........N=N+1..|
00000090  96 09 f2 69 6e 69 74 0d  00 a0 0a f2 70 72 69 6e  |...init.....prin|
000000a0  74 0d 00 aa 0a fd 20 4e  3d 31 30 0d 00 ac 06 ef  |t..... N=10.....|
000000b0  32 0d 00 b0 06 ef 33 0d  00 b4 0b fd 20 51 4e 3d  |2.....3..... QN=|
000000c0  51 43 0d 00 be 05 20 0d  00 c8 05 e0 0d 00 d2 05  |QC.... .........|
000000d0  20 0d 00 dc 05 20 0d 00  e6 05 20 0d 00 f0 05 20  | .... .... .... |
000000e0  0d 00 fa 05 20 0d 01 04  0c dd f2 63 6f 70 69 65  |.... ......copie|
000000f0  73 0d 01 0e 2a e8 27 27  22 48 6f 77 20 6d 61 6e  |s...*.''"How man|
00000100  79 20 63 6f 70 69 65 73  20 64 6f 20 79 6f 75 20  |y copies do you |
00000110  77 61 6e 74 3f 20 20 20  22 51 43 0d 01 18 05 db  |want?   "QC.....|
00000120  0d 01 22 05 e1 0d 01 2c  05 20 0d 01 36 0b dd f2  |.."....,. ..6...|
00000130  53 65 74 75 70 0d 01 40  0d e3 20 58 3d 31 20 b8  |Setup..@.. X=1 .|
00000140  20 38 0d 01 4a 0e 20 f3  20 42 75 73 24 28 58 29  | 8..J. . Bus$(X)|
00000150  0d 01 4f 15 20 50 72 69  63 65 28 58 29 3d b3 28  |..O. Price(X)=.(|
00000160  32 30 30 30 29 0d 01 54  1f 20 50 72 69 63 65 28  |2000)..T. Price(|
00000170  58 29 3d 28 50 72 69 63  65 28 58 29 2f 31 30 30  |X)=(Price(X)/100|
00000180  29 2b 35 30 0d 01 59 14  20 4e 75 6d 62 65 72 28  |)+50..Y. Number(|
00000190  58 29 3d b3 28 31 32 29  0d 01 5a 1b 20 4e 75 6d  |X)=.(12)..Z. Num|
000001a0  62 65 72 28 58 29 3d 4e  75 6d 62 65 72 28 58 29  |ber(X)=Number(X)|
000001b0  2b 34 30 0d 01 5e 07 ed  20 58 0d 01 86 0d e3 20  |+40..^.. X..... |
000001c0  5a 3d 31 20 b8 20 36 0d  01 90 10 20 f3 20 51 75  |Z=1 . 6.... . Qu|
000001d0  65 73 74 24 28 5a 29 0d  01 9a 07 ed 20 5a 0d 01  |est$(Z)..... Z..|
000001e0  9f 05 f7 0d 01 a4 05 e1  0d 01 ae 05 20 0d 01 b8  |............ ...|
000001f0  05 20 0d 01 c2 0d dd f2  4d 65 73 73 61 67 65 0d  |. ......Message.|
00000200  01 c3 06 ef 32 0d 01 cc  16 f1 20 8a 31 30 29 51  |....2..... .10)Q|
00000210  4e 3b 3a f1 20 8a 36 35  29 51 4e 0d 01 d6 a6 f1  |N;:. .65)QN.....|
00000220  27 22 54 68 65 73 65 20  61 72 65 20 70 72 6f 62  |'"These are prob|
00000230  6c 65 6d 73 20 66 6f 72  20 79 6f 75 20 74 6f 20  |lems for you to |
00000240  77 6f 72 6b 20 6f 6e 2e  22 27 22 52 65 61 64 20  |work on."'"Read |
00000250  74 68 65 6d 20 63 61 72  65 66 75 6c 6c 79 20 61  |them carefully a|
00000260  6e 64 20 61 6e 73 77 65  72 20 42 4f 54 48 20 71  |nd answer BOTH q|
00000270  75 65 73 74 69 6f 6e 73  2e 22 27 27 22 43 4f 41  |uestions."''"COA|
00000280  43 48 20 43 4f 4d 50 41  4e 49 45 53 20 2d 2d 2d  |CH COMPANIES ---|
00000290  2d 2d 20 50 52 49 43 45  20 4c 49 53 54 22 27 22  |-- PRICE LIST"'"|
000002a0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
000002c0  22 0d 01 db 07 4a 3d 30  0d 01 ea 0e 20 e3 20 48  |"....J=0.... . H|
000002d0  3d 31 20 b8 20 38 0d 01  ef 09 4a 3d 4a 2b 31 0d  |=1 . 8....J=J+1.|
000002e0  01 f3 0d 40 25 3d 31 33  31 35 39 34 0d 01 f4 38  |...@%=131594...8|
000002f0  f1 20 42 75 73 24 28 4a  29 3b 22 20 63 68 61 72  |. Bus$(J);" char|
00000300  67 65 20 23 22 3b 50 72  69 63 65 28 4a 29 3b 22  |ge #";Price(J);"|
00000310  20 66 6f 72 20 61 20 63  6f 61 63 68 20 77 69 74  | for a coach wit|
00000320  68 20 22 3b 0d 01 f6 09  40 25 3d 31 30 0d 01 f9  |h ";....@%=10...|
00000330  19 f1 3b 4e 75 6d 62 65  72 28 4a 29 3b 22 20 73  |..;Number(J);" s|
00000340  65 61 74 73 2e 22 0d 01  fe 07 ed 20 48 0d 02 12  |eats."..... H...|
00000350  05 f1 0d 02 13 06 ef 33  0d 02 1c 05 e1 0d 02 26  |.......3.......&|
00000360  05 20 0d 02 30 05 20 0d  02 3a 05 20 0d 02 44 05  |. ..0. ..:. ..D.|
00000370  20 0d 02 4e 05 20 0d 02  58 0a dd f2 69 6e 69 74  | ..N. ..X...init|
00000380  0d 02 62 0b 20 61 3d b3  28 38 29 0d 02 63 0a 71  |..b. a=.(8)..c.q|
00000390  3d b3 28 36 29 0d 02 64  12 45 3d b3 28 32 30 29  |=.(6)..d.E=.(20)|
000003a0  3a 42 3d b3 28 39 29 0d  02 6c 15 41 6e 73 77 65  |:B=.(9)..l.Answe|
000003b0  72 3d 50 72 69 63 65 28  61 29 2a 42 0d 02 76 17  |r=Price(a)*B..v.|
000003c0  41 4e 53 3d 28 4e 75 6d  62 65 72 28 61 29 2a 42  |ANS=(Number(a)*B|
000003d0  29 2d 45 0d 02 8a 05 e1  0d 02 94 05 20 0d 02 9e  |)-E......... ...|
000003e0  05 20 0d 02 a8 05 20 0d  02 b2 05 20 0d 02 bc 0b  |. .... .... ....|
000003f0  dd f2 70 72 69 6e 74 0d  02 bd 06 ef 32 0d 02 c6  |..print.....2...|
00000400  77 f1 22 46 6f 72 20 74  68 65 20 73 63 68 6f 6f  |w."For the schoo|
00000410  6c 20 74 72 69 70 20 74  68 65 20 68 65 61 64 20  |l trip the head |
00000420  62 6f 6f 6b 65 64 20 22  3b 42 3b 22 20 63 6f 61  |booked ";B;" coa|
00000430  63 68 65 73 22 27 22 66  72 6f 6d 20 22 3b 42 75  |ches"'"from ";Bu|
00000440  73 24 28 61 29 3b 22 2e  20 41 6c 6c 20 74 68 65  |s$(a);". All the|
00000450  20 63 6f 61 63 68 65 73  20 77 65 72 65 20 66 75  | coaches were fu|
00000460  6c 6c 20 65 78 63 65 70  74 20 6f 6e 65 20 77 68  |ll except one wh|
00000470  69 63 68 22 0d 02 d0 51  f1 22 68 61 64 20 22 3b  |ich"...Q."had ";|
00000480  45 3b 22 20 73 65 61 74  73 20 65 6d 70 74 79 2e  |E;" seats empty.|
00000490  20 48 6f 77 20 6d 61 6e  79 20 70 65 6f 70 6c 65  | How many people|
000004a0  20 77 65 6e 74 20 6f 6e  20 74 68 65 20 74 72 69  | went on the tri|
000004b0  70 3f 20 5f 5f 5f 5f 5f  22 3b 3a f1 20 8a 37 32  |p? _____";:. .72|
000004c0  29 3b 41 4e 53 0d 02 d5  0d 40 25 3d 31 33 31 35  |);ANS....@%=1315|
000004d0  39 34 0d 02 da 30 f1 20  51 75 65 73 74 24 28 71  |94...0. Quest$(q|
000004e0  29 3b 22 20 23 5f 5f 5f  5f 5f 5f 5f 5f 22 3b 3a  |);" #________";:|
000004f0  f1 20 8a 37 32 29 22 23  22 3b 41 6e 73 77 65 72  |. .72)"#";Answer|
00000500  3a f1 0d 02 dc 09 40 25  3d 31 30 0d 02 df 06 ef  |:.....@%=10.....|
00000510  33 0d 02 e4 05 e1 0d 27  10 2b dc 22 41 79 72 65  |3......'.+."Ayre|
00000520  76 69 6c 6c 65 20 43 6f  61 63 68 65 73 22 2c 22  |ville Coaches","|
00000530  57 65 73 74 65 72 6e 20  4e 61 74 69 6f 6e 61 6c  |Western National|
00000540  22 0d 2a f8 2e dc 22 54  61 6d 61 72 20 43 6f 61  |".*..."Tamar Coa|
00000550  63 68 20 43 6f 6d 70 61  6e 79 22 2c 22 4c 65 74  |ch Company","Let|
00000560  68 62 72 69 64 67 65 20  54 72 61 76 65 6c 22 0d  |hbridge Travel".|
00000570  2e e0 30 dc 22 4d 61 72  74 69 6e 20 61 6e 64 20  |..0."Martin and |
00000580  52 6f 73 73 20 42 75 73  65 73 22 2c 22 50 61 72  |Ross Buses","Par|
00000590  6b 73 20 6f 66 20 50 6c  79 6d 6f 75 74 68 22 0d  |ks of Plymouth".|
000005a0  32 c8 30 dc 22 48 75 6d  70 68 72 69 65 73 20 43  |2.0."Humphries C|
000005b0  6f 61 63 68 65 73 22 2c  22 54 68 65 20 4d 61 6a  |oaches","The Maj|
000005c0  6f 72 20 42 75 73 20 43  6f 6d 70 61 6e 79 22 0d  |or Bus Company".|
000005d0  3a 98 32 dc 20 22 48 6f  77 20 6d 75 63 68 20 64  |:.2. "How much d|
000005e0  69 64 20 74 68 65 20 73  63 68 6f 6f 6c 20 73 70  |id the school sp|
000005f0  65 6e 64 20 6f 6e 20 74  68 65 20 74 72 69 70 3f  |end on the trip?|
00000600  22 0d 3a fc 21 dc 20 22  48 6f 77 20 6d 75 63 68  |".:.!. "How much|
00000610  20 64 69 64 20 69 74 20  61 6c 6c 20 63 6f 73 74  | did it all cost|
00000620  3f 22 0d 3b 60 27 dc 20  22 48 6f 77 20 6d 75 63  |?".;`'. "How muc|
00000630  68 20 6d 6f 6e 65 79 20  77 6f 75 6c 64 20 62 65  |h money would be|
00000640  20 6e 65 65 64 65 64 3f  22 0d 3b c4 23 dc 20 22  | needed?".;.#. "|
00000650  48 6f 77 20 6d 75 63 68  20 77 61 73 20 69 74 20  |How much was it |
00000660  61 6c 74 6f 67 65 74 68  65 72 3f 22 0d 3c 28 20  |altogether?".<( |
00000670  dc 20 22 57 68 61 74 20  77 61 73 20 74 68 65 20  |. "What was the |
00000680  74 6f 74 61 6c 20 63 6f  73 74 3f 22 0d 3c 8c 29  |total cost?".<.)|
00000690  dc 20 22 57 68 61 74 20  77 61 73 20 74 68 65 20  |. "What was the |
000006a0  74 6f 74 61 6c 20 61 6d  6f 75 6e 74 20 6e 65 65  |total amount nee|
000006b0  64 65 64 3f 22 0d ff                              |ded?"..|
000006b7