Home » Personal collection » Acorn tapes » Electron_User » Electron_User_tape17a_acorn_eu_1990_december.wav » R.QuadSol

R.QuadSol

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 » Acorn tapes » Electron_User » Electron_User_tape17a_acorn_eu_1990_december.wav
Filename: R.QuadSol
Read OK:
File size: 01E0 bytes
Load address: FFFF1A00
Exec address: FFFF8023
Duplicates

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

File contents
   10REM Quadratic equation solver
   20REM by Frances White
   30REM (c) The Micro User
   40REM December 1990
   50MODE 6:PRINT '"QUADRATIC EQUATION SOLVER"'STRING$(25,"~")'''"Equation is :  A(x*x) + Bx + C = 0"''
   60INPUT'"What value does A have? "a
   70INPUT'"What value does B have? "b
   80INPUT'"What value does C have? "c
   90to_root=b^2-4*a*c
  100IF to_root<=0 THEN PRINT ''"Real solution unobtainable.":END
  110k=SQR(to_root):sol1=(-b+k)/(2*a)
  120sol2=(-b-k)/(2*a)
  130PRINT''"The two solutions to the problem are"';sol1;" and ";sol2'

� Quadratic equation solver
� by Frances White
� (c) The Micro User
(� December 1990
2X� 6:� '"QUADRATIC EQUATION SOLVER"'�25,"~")'''"Equation is :  A(x*x) + Bx + C = 0"''
<!�'"What value does A have? "a
F!�'"What value does B have? "b
P!�'"What value does C have? "c
Zto_root=b^2-4*a*c
d6� to_root<=0 � � ''"Real solution unobtainable.":�
n"k=�(to_root):sol1=(-b+k)/(2*a)
xsol2=(-b-k)/(2*a)
�A�''"The two solutions to the problem are"';sol1;" and ";sol2'
�
00000000  0d 00 0a 1f f4 20 51 75  61 64 72 61 74 69 63 20  |..... Quadratic |
00000010  65 71 75 61 74 69 6f 6e  20 73 6f 6c 76 65 72 0d  |equation solver.|
00000020  00 14 16 f4 20 62 79 20  46 72 61 6e 63 65 73 20  |.... by Frances |
00000030  57 68 69 74 65 0d 00 1e  18 f4 20 28 63 29 20 54  |White..... (c) T|
00000040  68 65 20 4d 69 63 72 6f  20 55 73 65 72 0d 00 28  |he Micro User..(|
00000050  13 f4 20 44 65 63 65 6d  62 65 72 20 31 39 39 30  |.. December 1990|
00000060  0d 00 32 58 eb 20 36 3a  f1 20 27 22 51 55 41 44  |..2X. 6:. '"QUAD|
00000070  52 41 54 49 43 20 45 51  55 41 54 49 4f 4e 20 53  |RATIC EQUATION S|
00000080  4f 4c 56 45 52 22 27 c4  32 35 2c 22 7e 22 29 27  |OLVER"'.25,"~")'|
00000090  27 27 22 45 71 75 61 74  69 6f 6e 20 69 73 20 3a  |''"Equation is :|
000000a0  20 20 41 28 78 2a 78 29  20 2b 20 42 78 20 2b 20  |  A(x*x) + Bx + |
000000b0  43 20 3d 20 30 22 27 27  0d 00 3c 21 e8 27 22 57  |C = 0"''..<!.'"W|
000000c0  68 61 74 20 76 61 6c 75  65 20 64 6f 65 73 20 41  |hat value does A|
000000d0  20 68 61 76 65 3f 20 22  61 0d 00 46 21 e8 27 22  | have? "a..F!.'"|
000000e0  57 68 61 74 20 76 61 6c  75 65 20 64 6f 65 73 20  |What value does |
000000f0  42 20 68 61 76 65 3f 20  22 62 0d 00 50 21 e8 27  |B have? "b..P!.'|
00000100  22 57 68 61 74 20 76 61  6c 75 65 20 64 6f 65 73  |"What value does|
00000110  20 43 20 68 61 76 65 3f  20 22 63 0d 00 5a 15 74  | C have? "c..Z.t|
00000120  6f 5f 72 6f 6f 74 3d 62  5e 32 2d 34 2a 61 2a 63  |o_root=b^2-4*a*c|
00000130  0d 00 64 36 e7 20 74 6f  5f 72 6f 6f 74 3c 3d 30  |..d6. to_root<=0|
00000140  20 8c 20 f1 20 27 27 22  52 65 61 6c 20 73 6f 6c  | . . ''"Real sol|
00000150  75 74 69 6f 6e 20 75 6e  6f 62 74 61 69 6e 61 62  |ution unobtainab|
00000160  6c 65 2e 22 3a e0 0d 00  6e 22 6b 3d b6 28 74 6f  |le.":...n"k=.(to|
00000170  5f 72 6f 6f 74 29 3a 73  6f 6c 31 3d 28 2d 62 2b  |_root):sol1=(-b+|
00000180  6b 29 2f 28 32 2a 61 29  0d 00 78 15 73 6f 6c 32  |k)/(2*a)..x.sol2|
00000190  3d 28 2d 62 2d 6b 29 2f  28 32 2a 61 29 0d 00 82  |=(-b-k)/(2*a)...|
000001a0  41 f1 27 27 22 54 68 65  20 74 77 6f 20 73 6f 6c  |A.''"The two sol|
000001b0  75 74 69 6f 6e 73 20 74  6f 20 74 68 65 20 70 72  |utions to the pr|
000001c0  6f 62 6c 65 6d 20 61 72  65 22 27 3b 73 6f 6c 31  |oblem are"';sol1|
000001d0  3b 22 20 61 6e 64 20 22  3b 73 6f 6c 32 27 0d ff  |;" and ";sol2'..|
000001e0
R.QuadSol.m0
R.QuadSol.m1
R.QuadSol.m2
R.QuadSol.m4
R.QuadSol.m5