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
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
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here