Question: Using UNIX to do this simple project !!!!!!! this is a simple project to print the dot product of two integer array of size N,
Using UNIX to do this simple project !!!!!!!
this is a simple project to print the dot product of two integer array of size N, where N is provided by user as input and can be very large. The input format is like this:
4
1234
4567
where the first number is N, then followed by one line of input with N numbers, which is the first array; it will then read in another line of input with N numbers, which is the second array; The dot product of two arrays A and B is defined as:

For the above example, the dot product is 14+25+36+47=50.
You code need to be able to run multiple times, until the user input N as a negative number.
You must create two functions: 1) ReadInput will create an array based on the argument, then read in all elements of an array; 2) DotProduct to find the dot product of two arrays. All these functions should be declared in a header file, and implemented in a source file.
Each run, you need to get N from the user, then call ReadInput twice, DotProduct once and print the result.
You need to turn in three files: makefile, main.C, xArray.C, xArray.h.
A B Ai Bi i-1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
