A short matrix program for the ZX80 written by 11-year-old Eric Deidman, a student in The Math Program of Champaign, IL. It multiplies a 1-by-4 matrix by a 4-by-1 matrix to give a 1-by-1 matrix. After the prompt INPUT NUMBERS TO BE USED, type eight numbers, pressing NEWLINE after each: the four in the row first, then the four in the column. The program prints THE ANSWER IS and the result, A*E+B*F+C*G+D*H.
There is only the one prompt, so the eight inputs are typed without further messages. The ZX80’s integer BASIC means whole numbers only.
Published in Syntax September 1981 (The Math Program).
Source Code
5 PRINT "INPUT NUMBERS TO BE USED"
10 INPUT A
20 INPUT B
30 INPUT C
40 INPUT D
50 INPUT E
60 INPUT F
70 INPUT G
80 INPUT H
90 LET J= A*E+B*F+C*G+D*H
100 PRINT "THE ANSWER IS ";JNote: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.

