Suppose that the array X consists of real numbers X1 X2 the
Suppose that the array X consists of real numbers X[1], X[2], the array Y consists of the real numbers Y[1], Y[2], and the array Z consists of the real numbers Z[1], Z[2]. What does the following algorithm compute?
1. LSUM 0
2. FOR I = 1 THRU 2
a. LSUM LSUM + (X[I])(Y[I])(Z[I])
Solution
it will compute the sum of multiplication of 3 arrays
![Suppose that the array X consists of real numbers X[1], X[2], the array Y consists of the real numbers Y[1], Y[2], and the array Z consists of the real numbers Suppose that the array X consists of real numbers X[1], X[2], the array Y consists of the real numbers Y[1], Y[2], and the array Z consists of the real numbers](/WebImages/3/suppose-that-the-array-x-consists-of-real-numbers-x1-x2-the-969021-1761499295-0.webp)