home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 14
/
014.d81
/
algebra
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
24KB
|
938 lines
4 rem: ...........................
5 rem: : algebra :
6 rem: :m.a.c.e. software contest:
7 rem: : john robinson :
8 rem: : 1984 :
9 rem: :.........................:
10 goto13000
50 print"[147]":poke53281,0:poke53280,0
60 fory=1to18
61 readz
62 poke1033+y,z:poke55305+y,2
63 next
70 fory=1to18
71 readz
72 poke1993+y,z:poke56265+y,2
73 next
95 rem:define variables
100 a=int(18*rnd(1))-9
110 b=int(18*rnd(1))-9
120 ifb=0thenb=1
130 c=int(18*rnd(1))-9
140 d=int(20*rnd(1))-10
150 ifd=0thend=1
160 e=int(20*rnd(1))-10
170 f=int(20*rnd(1))-10
180 a1=int(18*rnd(1))-9
190 b1=int(18*rnd(1))-9
200 ifb1=0thenb1=1
210 c1=int(18*rnd(1))-9
220 d1=int(20*rnd(1))-10
230 ifd1=0thend1=1
233 ifa=0then100
234 ifa1=0then100
235 n1=d*d1*f
240 n2=a*d1*c
250 n3=a1*d*c1
260 n4=d*d1*e
270 n5=a*d1*b
280 n6=a1*d*b1
290 m1=n1-n2-n3-n4
300 m2=n5+n6
310 ifm2=0then100
320 x=m1/m2
330 ifx=int(x)then336
335 goto100
336 ifx>99orx<-99then100
337 ifx=0then100
338 goto6000
339 ti$="000000"
340 print"[147]":goto8500
341 gosub7000
345 ifa=0then650
350 ifa=1then400
360 ifb=1then550
370 ifc=0then580
380 ifd=1then600
390 ifb=-1then393
391 ifc<0then395
392 t=9-l1-l2-l3:printtab(t-(-t*(t<1)))a"[157]("b"[157][154]x+"c"[157])":goto397
393 ifc<0then396
394 t=8-l1-l2:printtab(t-(-t*(t<1)))a"[157](-[154]x+"c"[157])":goto397
395 t=10-l1-l2-l3:printtab(t-(-t*(t<1)))a"[157]("b"[157][154]x"c"[157])":goto397
396 t=9-l1-l3:printtab(t-(-t*(t<1)))a"[157](-[154]x"c"[157])":goto397
397 printtab(t-(-t*(t<1)))"[192][192][192][192][192][192][192][192][192][192][192][192][192]"
398 printtab(t-(-t*(t<1)))" "d:goto650
400 ifb=1then440
410 ifc=0then470
420 ifd=1then490
430 ifb=-1then433
431 ifc<0then435
432 t=11-l2-l3:printtab(t-(-t*(t<1)))b"[157][154]x+"c:goto437
433 ifc<0then436
434 t=11-l3:printtab(t-(-t*(t<1)))"-[154]x+"c:goto437
435 t=12-l2-l3:printtab(t-(-t*(t<1)))b"[157][154]x"c:goto437
436 t=11-l3:printtab(t-(-t*(t<1)))"-[154]x"c
437 printtab(t-(-t*(t<1)))"[192][192][192][192][192][192][192][192][192][192][192][192][192]"
438 printtab(t+2)d:goto650
440 ifc=0then500
450 ifd=1then520
460 ifc<0then467
464 t=11-l3:printtab(t-(-t*(t<1)))"[154]x+"c"
465 [153][163]t[171]([171]t[172](t[179]1)))"tantantantantantantantantan"
466 [153][163]t[170]1)d:[137]650
467 t[178]12[171]l3:[153][163]t[171]([171]t[172](t[179]1)))"contx"c:[137]465
470 [139]d[178]1[167]530
480 t[178]12[171]l2:[153][163]t[171]([171]t[172](t[179]1)))b"cmdcontx"
481 [153][163]t[171]([171]t[172](t[179]1)))"tantantantantantan"
482 [153][163]t[170]1)d:[137]650
490 [139]b[178][171]1[167]493
491 [139]c[179]0[167]495
492 t[178]12[171]l2[171]l3:[153][163]t[171]([171]t[172](t[179]1)))""b"cmdcontx+"c"":[137]650
493 [139]c[179]0[167]496
494 t[178]11[171]l3:[153][163]t[171]([171]t[172](t[179]1)))"-contx+"c"":[137]650
495 t[178]13[171]l2[171]l3:[153][163]t[171]([171]t[172](t[179]1)))""b"cmdcontx"c"":[137]650
496 t[178]12[171]l3:[153][163]t[171]([171]t[172](t[179]1)))"-contx"c"":[137]650
500 [139]d[178]1[167]540
510 t[178]12[171]l7:[153][163]t[171]([171]t[172](t[179]1)))"contx"
511 [153][163]t[171]1)"tantantantan"
512 [153][163]t[171]1)d:[137]650
520 [139]c[179]0[167]525
521 t[178]10[171]l3:[153][163]t[171]([171]t[172](t[179]1)))"contx +"c"":[137]650
525 t[178]12[171]l3:[153][163]t[171]([171]t[172](t[179]1)))"contx"c"":[137]650
530 [139]b[178][171]1[167]532
531 t[178]13[171]l2:[153][163]t[171]([171]t[172](t[179]1)))""b"cmdcontx":[137]650
532 t[178]12:[153][163]t[171]([171]t[172](t[179]1)))"-contx":[137]650
540 [139]a1[178]0[175]e[178]0[167]543
541 t[178]13:[153][163]t[171]([171]t[172](t[179]1)))"contx"
542 [137]650
543 [153][163]12)"def(NULL)tantantantantantantantanright$"
544 [153][163]12)"peekcontx = "f:[153][163]21)"defonpeek"
545 [153][163]12)"mid$tantantantantantantantan(NULL)"
546 [153][163]34)"syscheck":[137]10340
550 [139]c[178]0[167]610
560 [139]d[178]1[167]630
570 [139]c[179]0[167]575
571 t[178]9[171]l1[171]l3:[153][163]t[171]([171]t[172](t[179]1)))a"cmd(contx+"c"cmd)"
572 [153][163]t[171]([171]t[172](t[179]1)))"tantantantantantantantantantantantan"
573 [153][163]t[170]3)d:[137]650
575 t[178]10[171]l1[171]l3:[153][163]t[171]([171]t[172](t[179]1)))a"cmd(contx"c"cmd)":[137]572
580 [139]d[178]1[167]640
590 [139]b[178][171]1[167]595
591 t[178]10[171]l1[171]l2:[153][163]t[171]([171]t[172](t[179]1)))a"cmd("b"cmdcontx)"
592 [153][163]t[171]([171]t[172](t[179]1)))"tantantantantantantantantantan"
593 [153][163]t[170]2)d:[137]650
595 t[178]9[171]l1:[153][163]t[171]([171]t[172](t[179]1)))a"cmd(-contx)":[137]592
600 [139]b[178][171]1[167]603
601 [139]c[179]0[167]605
602 t[178]10[171]l1[171]l2[171]l3:[153][163]t[171]([171]t[172](t[179]1)))""a"cmd("b"cmdcontx+"c"cmd)":[137]650
603 [139]c[179]0[167]606
604 t[178]8[171]l1[171]l3:[153][163]t[171]([171]t[172](t[179]1)))""a"cmd(-contx+"c"cmd)":[137]650
605 t[178]11[171]l1[171]l2[171]l3:[153][163]t[171]([171]t[172](t[179]1)))""a"cmd("b"cmdcontx"c"cmd)":[137]650
606 t[178]9[171]l1[171]l3:[153][163]t[171]([171]t[172](t[179]1)))" "a"cmd(-contx"c"cmd)":[137]650
610 [139]d[178]1[167]645
620 t[178]12[171]l1:[153][163]t[171]([171]t[172](t[179]1)))a"cmdcontx"
621 [153][163]t[171]([171]t[172](t[179]1)))"tantantantantan"
622 [153][163]t[170]1)d:[137]650
630 [139]c[179]0[167]635
631 t[178]9[171]l1[171]l3:[153][163]t[171]([171]t[172](t[179]1)))""a"cmd(contx+"c"cmd)":[137]650
635 t[178]10[171]l1[171]l3:[153][163]t[171]([171]t[172](t[179]1)))" "a"cmd(contx"c"cmd)":[137]650
640 [139]b[178][171]1[167]644
641 t[178]10[171]l1[171]l2:[153][163]t[171]([171]t[172](t[179]1)))" "a"cmd("b"cmdcontx)":[137]650
644 t[178]9[171]l1:[153][163]t[171]([171]t[172](t[179]1)))""a"cmd(-contx)":[137]650
645 [139]a[178][171]1[167]647
646 t[178]13[171]l1:[153][163]t[171]([171]t[172](t[179]1)))""a"cmdcontx":[137]650
647 t[178]11:[153][163]t[171]([171]t[172](t[179]1)))" -contx"
650 t[178]14:[139]a1[178]0[167]720
660 [139]a1[178]1[167]730
670 [139]b1[178]1[167]780
680 [139]c1[178]0[167]820
690 [139]d1[178]1[167]850
700 [139]e[178]0[167]870
710 [139]b1[178][171]1[167]713
711 [139]c1[179]0[167]715
712 [153][163]t[171]([171]t[172](t[179]1)))"ononon "a1"cmd("b1"cmdcontx+"c1"cmd)":[137]717
713 [139]c1[179]0[167]716
714 [153][163]t[171]([171]t[172](t[179]1)))"ononon "a1"cmd(-contx+"c1"cmd)":[137]717
715 [153][163]t[171]([171]t[172](t[179]1)))"ononon "a1"cmd("b1"cmdcontx"c1"cmd)":[137]717
716 [153][163]t[171]([171]t[172](t[179]1)))"ononon "a1"cmd(-contx"c1"cmd)":[137]717
717 [139]e[179]0[167]719
718 [153][163]t[171]([171]t[172](t[179]1)))" + tantantantantantantantantantan +"e"= "f:[153][163]t[171]([171]t[172](t[179]1)))" "d1:[137]2000
719 [153][163]t[171]([171]t[172](t[179]1)))" + tantantantantantantantantantan "e"= "f:[153][163]t[171]([171]t[172](t[179]1)))" "d1:[137]2000
720 [139]e[178]0[167]725
721 [139]e[179]0[167]726
722 [153][163]t[171]([171]t[172](t[179]1)))"onon +"e"= "f"":[137]2000
725 [153][163]t[171]([171]t[172](t[179]1)))"onon = "f"":[137]2000
726 [153][163]t[171]([171]t[172](t[179]1)))"onon"e"= "f"":[137]2000
730 [139]b1[178]1[167]880
740 [139]c1[178]0[167]920
750 [139]d1[178]1[167]950
760 [139]e[178]0[167]970
770 [139]c1[179]0[167]773
771 [139]b1[178][171]1[167]779
772 t1[178]t[170]l5[170]l6[170]5:[153][163]t[171]([171]t[172](t[179]1)))"ononon "b1"cmdcontx+"c1:[137]774
773 t1[178]t[170]l5[170]l6[170]5:[153][163]t[171]([171]t[172](t[179]1)))"ononon "b1"cmdcontx"c1
774 [153][163]t[171]([171]t[172](t[179]1)))" + tantantantantantantantantan"
775 [139]e[179]0[167]777
776 [153][163]t1)"on +"e"= "f:[137]778
777 [153][163]t1)"on "e"= "f
778 [153][163]t[171]([171]t[172](t[179]1)))" "d1:[137]2000
779 t1[178]t[170]l6[170]6:[153][163]t[171]([171]t[172](t[179]1)))"ononon -contx+"c1:[137]774
780 [139]c1[178]0[167]980
790 [139]d1[178]1[167]1010
800 [139]e[178]0[167]1030
810 [139]c1[179]0[167]812
811 [153][163]t[171]([171]t[172](t[179]1)))"ononon "a1"cmd(contx+"c1"cmd)":[137]813
812 [153][163]t[171]([171]t[172](t[179]1)))"ononon "a1"cmd(contx"c1"cmd)"
813 [139]e[179]0[167]815
814 [153][163]t[171]([171]t[172](t[179]1)))" + tantantantantantantantantan +"e"= "f:[137]816
815 [153][163]t