DOT Example10 DATA 1,2,3,4,5,6
20 RESTORE
30 Vector: IMAGE 3("[",DD,"]",/) !Printing format.
40 Row_vector: IMAGE 3("[",DD,"]") !Printing format.
50 OPTION BASE 1
60 INTEGER A(3),B(3)
70 CLEAR SCREEN
80 READ A(*),B(*)
90 PRINT "Vector a = "
100 PRINT USING Row_vector;A(*)
110 PRINT "Vector b = "
120 PRINT USING Vector;B(*)
130 PRINT "The DOT product is ";DOT(A,B)
140 END
|