I'm trying to compute the product of all elements in a given array using MPI c. The problem I'm having is I can't figure out how to code it porperly. I'm assuming this is what the code is #include ...


I'm trying to  compute the product of all elements in a given array using MPI c. The problem I'm having is I can't figure out how to code it porperly. I'm assuming this is what the code is


#include
#include
#include

#include


 int Compute_Product(int *array, int num_elements)
 {
     int product = 1;
     int i;

     for (i = 0; i < num_elements;="">
         product *= array[i];
     }


But I can't figure out how to declare the array. It's been years since I've coded and I am at my wits end



Jun 07, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here