Question: Write a C program that includes the following: 1. A function that finds the product of the maximum value in array a and the maximum

Write a C program that includes the following:

1. A function that finds the product of the maximum value in array a and the maximum value in array b then returns the result, with the following prototype:

int Product_Maximum (int *a , int *b , int size);

2. A function that multiplies each element of array a by the corresponding element in array b and sums all the products then returns the result, with the following prototype:

int Sum_Of_Products (int *a , int *b, int size);

3. The main function that:

-Declares two integers named Promax and Sumproduct as well as two integer arrays named ExperimentArray1 and ExperimentArray2 which both contains 45 elements.

-Reads ExperimentArray1 and ExperimentArray2 from the keyboard.

-Calls Product_Maximum to find the product of the maximum value in ExperimentArray1 and the maximum value in ExperimentArray2, then saves the result in Promax.

-Calls Sum_Of_Products with ExperimentArray1 and ExperimentArray2, then saves the result in Sumproduct.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!