Question: C++ Exercise #2: Dot Product write a program that reads values in arrays A[ ] and B[ ] each of size N. The program calculates
C++ Exercise #2: Dot Product write a program that reads values in arrays A[ ] and B[ ] each of size N. The program calculates and prints the dot product of the two arrays The dot product AB is defined as in the following formula: a2 The program prints each value up to three decimal places. 2/3 Sample input/ output Enter the array size: 7 nter value number 1 of each array: 4.3 9.17 nter value nunber 2 of each array: 71.88 13.5 nter value number 3 of each array: 24.8 51.2 nter value number 4 of each array: 66.11 7.999 Enter value number 5 of each array: 31.7 64.8 Enter value number 6 of each array: 5.8 12.e nter value number 7 of each array: 86.7 45.52 The values of the first array are: The values of the second array are: The dot product is: 8878.729 4.300 71.888 24.88066.11031.708 5.80e 86.7ee 9.170 13.s80 51.200 7.999 64.880 12.000 45.520
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
