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

C/GARDEN

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/GARDEN
Read OK:
File size: 07B2 bytes
Load address: FFFFFB42
Exec address: 181D2B38
Duplicates

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

File contents
   10MODE 7
   20PROCcopies
   30DIM Plant$(12)
   40DIM Name$(10)
   50DIM Quest$(6)
   60 DIM Price(12)
   65DIM Tray(12)
   70QN=0
   80REPEAT
   90QN=QN+1
  100PROCSetup
  110PROCMessage
  120N=0
  130REPEAT
  140N=N+1
  150PROCinit
  160PROCprint
  170UNTIL N=10
  172VDU2
  175PRINT"NOW CHECK YOUR ANSWERS.":PRINT
  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 12
  330 READ Plant$(X)
  335 Price(X)=RND(500)
  340 Price(X)=(Price(X)/100)+1
  345Tray(X)=RND(12)
  346Tray(X)=Tray(X)*2
  350NEXT X
  360FOR Y=1 TO 10
  370 READ Name$(Y)
  380NEXT Y
  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 money problems."'"Read them carefully and answer BOTH questions."''"THE GARDEN CENTRE ----- PRICE LIST"'"------------------------------------------"
  475J=0
  480 FOR I=1 TO 6
  490 FOR H=1 TO 2
  495J=J+1
  499@%=131594
  500PRINT Plant$(J);" #";Price(J);
  502@%=10
  505PRINT" for a tray of ";Tray(J);",  ";
  510NEXT H
  515PRINT'"";
  520NEXT I
  530PRINT
  531VDU3
  540ENDPROC
  550 
  560 
  570 
  580 
  590 
  600DEFPROCinit
  610 a=RND(12):b=RND(12):c=RND(12)
  620IF a=b OR a=c OR b=c THEN 610 ELSE 630
  630n=RND(10):q=RND(6)
  640M=RND(4):L=RND(4):K=RND(4)
  641IF M=1 OR L=1 OR K=1 THEN 640
  642Answer=(Price(a)*K)+(Price(b)*L)+(Price(c)*M)
  643ANS=(Tray(a)*K)+(Tray(b)*L)+(Tray(c)*M)
  650ENDPROC
  660 
  670 
  680 
  690 
  700DEFPROCprint
  701VDU2
  710 PRINT"At the Garden Centre ";Name$(n);" brought ";K;" trays of ";Plant$(a);","
  720PRINT;L;" trays of ";Plant$(b);" and ";M;" trays of ";Plant$(c);"."'"How many plants were brought? _______";:PRINT TAB(72);ANS
  725@%=131594
  730 PRINT Quest$(q);" #________";:PRINT TAB(72)"#";Answer:PRINT
  732@%=10
  735VDU3
  740ENDPROC
10000DATALettuces,Alyssum,Cabbages,Heathers
11000DATACucumbers,Fuschias,Herbs,Lobelia
12000DATATomatoes,Pansies,Peppers,Marigolds
13000DATA Christopher,Katherine,Louise,Douglas,Ruth
14000DATA James,Michelle,Shony,Siobhan,Rachel
15000DATA "How much was spent in the Garden Centre?"
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
� Plant$(12)
(� Name$(10)
2� Quest$(6)
< � Price(12)
A� Tray(12)
FQN=0
P�
ZQN=QN+1
d
�Setup
n�Message
xN=0
��
�	N=N+1
�	�init
�
�print
�
� N=10
��2
� �"NOW CHECK YOUR ANSWERS.":�
��3
�� QN=QC
� 
��
� 
� 
� 
� 
� 
��copies
*�''"How many copies do you want?   "QC
�
"�
, 
6��Setup
@� X=1 � 12
J � Plant$(X)
O Price(X)=�(500)
T Price(X)=(Price(X)/100)+1
YTray(X)=�(12)
ZTray(X)=Tray(X)*2
^� X
h� Y=1 � 10
r � Name$(Y)
|� Y
�
� Z=1 � 6
� � Quest$(Z)
�� Z
��
��
� 
� 
�
��Message
��2
�� �10)QN;:� �65)QN
֥�'"These are money problems."'"Read them carefully and answer BOTH questions."''"THE GARDEN CENTRE ----- PRICE LIST"'"------------------------------------------"
�J=0
� � I=1 � 6
� � H=1 � 2
�	J=J+1
�
@%=131594
�� Plant$(J);" #";Price(J);
�	@%=10
�%�" for a tray of ";Tray(J);",  ";
�� H
	�'"";
� I
�
�3
�
& 
0 
: 
D 
N 
X
��init
b a=�(12):b=�(12):c=�(12)
l#� a=b � a=c � b=c � �DbB � �DvB
vn=�(10):q=�(6)
�M=�(4):L=�(4):K=�(4)
�� M=1 � L=1 � K=1 � �t@B
�1Answer=(Price(a)*K)+(Price(b)*L)+(Price(c)*M)
�+ANS=(Tray(a)*K)+(Tray(b)*L)+(Tray(c)*M)
��
� 
� 
� 
� 
���print
��2
�O �"At the Garden Centre ";Name$(n);" brought ";K;" trays of ";Plant$(a);","
�w�;L;" trays of ";Plant$(b);" and ";M;" trays of ";Plant$(c);"."'"How many plants were brought? _______";:� �72);ANS
�
@%=131594
�1 � Quest$(q);" #________";:� �72)"#";Answer:�
�	@%=10
��3
��
''�Lettuces,Alyssum,Cabbages,Heathers
*�%�Cucumbers,Fuschias,Herbs,Lobelia
.�'�Tomatoes,Pansies,Peppers,Marigolds
2�/� Christopher,Katherine,Louise,Douglas,Ruth
6�)� James,Michelle,Shony,Siobhan,Rachel
:�0� "How much was spent in the Garden Centre?"
:�!� "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 10 de 20  50 6c 61 6e 74 24 28 31  |es..... Plant$(1|
00000020  32 29 0d 00 28 0f de 20  4e 61 6d 65 24 28 31 30  |2)..(.. Name$(10|
00000030  29 0d 00 32 0f de 20 51  75 65 73 74 24 28 36 29  |)..2.. Quest$(6)|
00000040  0d 00 3c 10 20 de 20 50  72 69 63 65 28 31 32 29  |..<. . Price(12)|
00000050  0d 00 41 0e de 20 54 72  61 79 28 31 32 29 0d 00  |..A.. Tray(12)..|
00000060  46 08 51 4e 3d 30 0d 00  50 05 f5 0d 00 5a 0b 51  |F.QN=0..P....Z.Q|
00000070  4e 3d 51 4e 2b 31 0d 00  64 0a f2 53 65 74 75 70  |N=QN+1..d..Setup|
00000080  0d 00 6e 0c f2 4d 65 73  73 61 67 65 0d 00 78 07  |..n..Message..x.|
00000090  4e 3d 30 0d 00 82 05 f5  0d 00 8c 09 4e 3d 4e 2b  |N=0.........N=N+|
000000a0  31 0d 00 96 09 f2 69 6e  69 74 0d 00 a0 0a f2 70  |1.....init.....p|
000000b0  72 69 6e 74 0d 00 aa 0a  fd 20 4e 3d 31 30 0d 00  |rint..... N=10..|
000000c0  ac 06 ef 32 0d 00 af 20  f1 22 4e 4f 57 20 43 48  |...2... ."NOW CH|
000000d0  45 43 4b 20 59 4f 55 52  20 41 4e 53 57 45 52 53  |ECK YOUR ANSWERS|
000000e0  2e 22 3a f1 0d 00 b0 06  ef 33 0d 00 b4 0b fd 20  |.":......3..... |
000000f0  51 4e 3d 51 43 0d 00 be  05 20 0d 00 c8 05 e0 0d  |QN=QC.... ......|
00000100  00 d2 05 20 0d 00 dc 05  20 0d 00 e6 05 20 0d 00  |... .... .... ..|
00000110  f0 05 20 0d 00 fa 05 20  0d 01 04 0c dd f2 63 6f  |.. .... ......co|
00000120  70 69 65 73 0d 01 0e 2a  e8 27 27 22 48 6f 77 20  |pies...*.''"How |
00000130  6d 61 6e 79 20 63 6f 70  69 65 73 20 64 6f 20 79  |many copies do y|
00000140  6f 75 20 77 61 6e 74 3f  20 20 20 22 51 43 0d 01  |ou want?   "QC..|
00000150  18 05 db 0d 01 22 05 e1  0d 01 2c 05 20 0d 01 36  |....."....,. ..6|
00000160  0b dd f2 53 65 74 75 70  0d 01 40 0e e3 20 58 3d  |...Setup..@.. X=|
00000170  31 20 b8 20 31 32 0d 01  4a 10 20 f3 20 50 6c 61  |1 . 12..J. . Pla|
00000180  6e 74 24 28 58 29 0d 01  4f 14 20 50 72 69 63 65  |nt$(X)..O. Price|
00000190  28 58 29 3d b3 28 35 30  30 29 0d 01 54 1e 20 50  |(X)=.(500)..T. P|
000001a0  72 69 63 65 28 58 29 3d  28 50 72 69 63 65 28 58  |rice(X)=(Price(X|
000001b0  29 2f 31 30 30 29 2b 31  0d 01 59 11 54 72 61 79  |)/100)+1..Y.Tray|
000001c0  28 58 29 3d b3 28 31 32  29 0d 01 5a 15 54 72 61  |(X)=.(12)..Z.Tra|
000001d0  79 28 58 29 3d 54 72 61  79 28 58 29 2a 32 0d 01  |y(X)=Tray(X)*2..|
000001e0  5e 07 ed 20 58 0d 01 68  0e e3 20 59 3d 31 20 b8  |^.. X..h.. Y=1 .|
000001f0  20 31 30 0d 01 72 0f 20  f3 20 4e 61 6d 65 24 28  | 10..r. . Name$(|
00000200  59 29 0d 01 7c 07 ed 20  59 0d 01 86 0d e3 20 5a  |Y)..|.. Y..... Z|
00000210  3d 31 20 b8 20 36 0d 01  90 10 20 f3 20 51 75 65  |=1 . 6.... . Que|
00000220  73 74 24 28 5a 29 0d 01  9a 07 ed 20 5a 0d 01 9f  |st$(Z)..... Z...|
00000230  05 f7 0d 01 a4 05 e1 0d  01 ae 05 20 0d 01 b8 05  |........... ....|
00000240  20 0d 01 c2 0d dd f2 4d  65 73 73 61 67 65 0d 01  | ......Message..|
00000250  c3 06 ef 32 0d 01 cc 16  f1 20 8a 31 30 29 51 4e  |...2..... .10)QN|
00000260  3b 3a f1 20 8a 36 35 29  51 4e 0d 01 d6 a5 f1 27  |;:. .65)QN.....'|
00000270  22 54 68 65 73 65 20 61  72 65 20 6d 6f 6e 65 79  |"These are money|
00000280  20 70 72 6f 62 6c 65 6d  73 2e 22 27 22 52 65 61  | problems."'"Rea|
00000290  64 20 74 68 65 6d 20 63  61 72 65 66 75 6c 6c 79  |d them carefully|
000002a0  20 61 6e 64 20 61 6e 73  77 65 72 20 42 4f 54 48  | and answer BOTH|
000002b0  20 71 75 65 73 74 69 6f  6e 73 2e 22 27 27 22 54  | questions."''"T|
000002c0  48 45 20 47 41 52 44 45  4e 20 43 45 4e 54 52 45  |HE GARDEN CENTRE|
000002d0  20 2d 2d 2d 2d 2d 20 50  52 49 43 45 20 4c 49 53  | ----- PRICE LIS|
000002e0  54 22 27 22 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |T"'"------------|
000002f0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
00000300  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 22 0d  |--------------".|
00000310  01 db 07 4a 3d 30 0d 01  e0 0e 20 e3 20 49 3d 31  |...J=0.... . I=1|
00000320  20 b8 20 36 0d 01 ea 0e  20 e3 20 48 3d 31 20 b8  | . 6.... . H=1 .|
00000330  20 32 0d 01 ef 09 4a 3d  4a 2b 31 0d 01 f3 0d 40  | 2....J=J+1....@|
00000340  25 3d 31 33 31 35 39 34  0d 01 f4 1e f1 20 50 6c  |%=131594..... Pl|
00000350  61 6e 74 24 28 4a 29 3b  22 20 23 22 3b 50 72 69  |ant$(J);" #";Pri|
00000360  63 65 28 4a 29 3b 0d 01  f6 09 40 25 3d 31 30 0d  |ce(J);....@%=10.|
00000370  01 f9 25 f1 22 20 66 6f  72 20 61 20 74 72 61 79  |..%." for a tray|
00000380  20 6f 66 20 22 3b 54 72  61 79 28 4a 29 3b 22 2c  | of ";Tray(J);",|
00000390  20 20 22 3b 0d 01 fe 07  ed 20 48 0d 02 03 09 f1  |  ";..... H.....|
000003a0  27 22 22 3b 0d 02 08 07  ed 20 49 0d 02 12 05 f1  |'"";..... I.....|
000003b0  0d 02 13 06 ef 33 0d 02  1c 05 e1 0d 02 26 05 20  |.....3.......&. |
000003c0  0d 02 30 05 20 0d 02 3a  05 20 0d 02 44 05 20 0d  |..0. ..:. ..D. .|
000003d0  02 4e 05 20 0d 02 58 0a  dd f2 69 6e 69 74 0d 02  |.N. ..X...init..|
000003e0  62 1c 20 61 3d b3 28 31  32 29 3a 62 3d b3 28 31  |b. a=.(12):b=.(1|
000003f0  32 29 3a 63 3d b3 28 31  32 29 0d 02 6c 23 e7 20  |2):c=.(12)..l#. |
00000400  61 3d 62 20 84 20 61 3d  63 20 84 20 62 3d 63 20  |a=b . a=c . b=c |
00000410  8c 20 8d 44 62 42 20 8b  20 8d 44 76 42 0d 02 76  |. .DbB . .DvB..v|
00000420  12 6e 3d b3 28 31 30 29  3a 71 3d b3 28 36 29 0d  |.n=.(10):q=.(6).|
00000430  02 80 18 4d 3d b3 28 34  29 3a 4c 3d b3 28 34 29  |...M=.(4):L=.(4)|
00000440  3a 4b 3d b3 28 34 29 0d  02 81 1c e7 20 4d 3d 31  |:K=.(4)..... M=1|
00000450  20 84 20 4c 3d 31 20 84  20 4b 3d 31 20 8c 20 8d  | . L=1 . K=1 . .|
00000460  74 40 42 0d 02 82 31 41  6e 73 77 65 72 3d 28 50  |t@B...1Answer=(P|
00000470  72 69 63 65 28 61 29 2a  4b 29 2b 28 50 72 69 63  |rice(a)*K)+(Pric|
00000480  65 28 62 29 2a 4c 29 2b  28 50 72 69 63 65 28 63  |e(b)*L)+(Price(c|
00000490  29 2a 4d 29 0d 02 83 2b  41 4e 53 3d 28 54 72 61  |)*M)...+ANS=(Tra|
000004a0  79 28 61 29 2a 4b 29 2b  28 54 72 61 79 28 62 29  |y(a)*K)+(Tray(b)|
000004b0  2a 4c 29 2b 28 54 72 61  79 28 63 29 2a 4d 29 0d  |*L)+(Tray(c)*M).|
000004c0  02 8a 05 e1 0d 02 94 05  20 0d 02 9e 05 20 0d 02  |........ .... ..|
000004d0  a8 05 20 0d 02 b2 05 20  0d 02 bc 0b dd f2 70 72  |.. .... ......pr|
000004e0  69 6e 74 0d 02 bd 06 ef  32 0d 02 c6 4f 20 f1 22  |int.....2...O ."|
000004f0  41 74 20 74 68 65 20 47  61 72 64 65 6e 20 43 65  |At the Garden Ce|
00000500  6e 74 72 65 20 22 3b 4e  61 6d 65 24 28 6e 29 3b  |ntre ";Name$(n);|
00000510  22 20 62 72 6f 75 67 68  74 20 22 3b 4b 3b 22 20  |" brought ";K;" |
00000520  74 72 61 79 73 20 6f 66  20 22 3b 50 6c 61 6e 74  |trays of ";Plant|
00000530  24 28 61 29 3b 22 2c 22  0d 02 d0 77 f1 3b 4c 3b  |$(a);","...w.;L;|
00000540  22 20 74 72 61 79 73 20  6f 66 20 22 3b 50 6c 61  |" trays of ";Pla|
00000550  6e 74 24 28 62 29 3b 22  20 61 6e 64 20 22 3b 4d  |nt$(b);" and ";M|
00000560  3b 22 20 74 72 61 79 73  20 6f 66 20 22 3b 50 6c  |;" trays of ";Pl|
00000570  61 6e 74 24 28 63 29 3b  22 2e 22 27 22 48 6f 77  |ant$(c);"."'"How|
00000580  20 6d 61 6e 79 20 70 6c  61 6e 74 73 20 77 65 72  | many plants wer|
00000590  65 20 62 72 6f 75 67 68  74 3f 20 5f 5f 5f 5f 5f  |e brought? _____|
000005a0  5f 5f 22 3b 3a f1 20 8a  37 32 29 3b 41 4e 53 0d  |__";:. .72);ANS.|
000005b0  02 d5 0d 40 25 3d 31 33  31 35 39 34 0d 02 da 31  |...@%=131594...1|
000005c0  20 f1 20 51 75 65 73 74  24 28 71 29 3b 22 20 23  | . Quest$(q);" #|
000005d0  5f 5f 5f 5f 5f 5f 5f 5f  22 3b 3a f1 20 8a 37 32  |________";:. .72|
000005e0  29 22 23 22 3b 41 6e 73  77 65 72 3a f1 0d 02 dc  |)"#";Answer:....|
000005f0  09 40 25 3d 31 30 0d 02  df 06 ef 33 0d 02 e4 05  |.@%=10.....3....|
00000600  e1 0d 27 10 27 dc 4c 65  74 74 75 63 65 73 2c 41  |..'.'.Lettuces,A|
00000610  6c 79 73 73 75 6d 2c 43  61 62 62 61 67 65 73 2c  |lyssum,Cabbages,|
00000620  48 65 61 74 68 65 72 73  0d 2a f8 25 dc 43 75 63  |Heathers.*.%.Cuc|
00000630  75 6d 62 65 72 73 2c 46  75 73 63 68 69 61 73 2c  |umbers,Fuschias,|
00000640  48 65 72 62 73 2c 4c 6f  62 65 6c 69 61 0d 2e e0  |Herbs,Lobelia...|
00000650  27 dc 54 6f 6d 61 74 6f  65 73 2c 50 61 6e 73 69  |'.Tomatoes,Pansi|
00000660  65 73 2c 50 65 70 70 65  72 73 2c 4d 61 72 69 67  |es,Peppers,Marig|
00000670  6f 6c 64 73 0d 32 c8 2f  dc 20 43 68 72 69 73 74  |olds.2./. Christ|
00000680  6f 70 68 65 72 2c 4b 61  74 68 65 72 69 6e 65 2c  |opher,Katherine,|
00000690  4c 6f 75 69 73 65 2c 44  6f 75 67 6c 61 73 2c 52  |Louise,Douglas,R|
000006a0  75 74 68 0d 36 b0 29 dc  20 4a 61 6d 65 73 2c 4d  |uth.6.). James,M|
000006b0  69 63 68 65 6c 6c 65 2c  53 68 6f 6e 79 2c 53 69  |ichelle,Shony,Si|
000006c0  6f 62 68 61 6e 2c 52 61  63 68 65 6c 0d 3a 98 30  |obhan,Rachel.:.0|
000006d0  dc 20 22 48 6f 77 20 6d  75 63 68 20 77 61 73 20  |. "How much was |
000006e0  73 70 65 6e 74 20 69 6e  20 74 68 65 20 47 61 72  |spent in the Gar|
000006f0  64 65 6e 20 43 65 6e 74  72 65 3f 22 0d 3a fc 21  |den Centre?".:.!|
00000700  dc 20 22 48 6f 77 20 6d  75 63 68 20 64 69 64 20  |. "How much did |
00000710  69 74 20 61 6c 6c 20 63  6f 73 74 3f 22 0d 3b 60  |it all cost?".;`|
00000720  27 dc 20 22 48 6f 77 20  6d 75 63 68 20 6d 6f 6e  |'. "How much mon|
00000730  65 79 20 77 6f 75 6c 64  20 62 65 20 6e 65 65 64  |ey would be need|
00000740  65 64 3f 22 0d 3b c4 23  dc 20 22 48 6f 77 20 6d  |ed?".;.#. "How m|
00000750  75 63 68 20 77 61 73 20  69 74 20 61 6c 74 6f 67  |uch was it altog|
00000760  65 74 68 65 72 3f 22 0d  3c 28 20 dc 20 22 57 68  |ether?".<( . "Wh|
00000770  61 74 20 77 61 73 20 74  68 65 20 74 6f 74 61 6c  |at was the total|
00000780  20 63 6f 73 74 3f 22 0d  3c 8c 29 dc 20 22 57 68  | cost?".<.). "Wh|
00000790  61 74 20 77 61 73 20 74  68 65 20 74 6f 74 61 6c  |at was the total|
000007a0  20 61 6d 6f 75 6e 74 20  6e 65 65 64 65 64 3f 22  | amount needed?"|
000007b0  0d ff                                             |..|
000007b2