Consider a system that consists of five processes process 0


Question: Write a C/ C++ program using MPI:

Consider a system that consists of five processes. Process 0 generates random integers and send them to process 1.

Process 1 checks if the received number is odd/even, and send both the number and the result of the even/odd to process 2.

Process 2 checks if the number is prime, and send both results of the checks even/odd and prime to process 3. Process 3 put all these results into struct data structure and send it to process 4.

Process 4 displays the following results:

I am process Number xxx:

The number 21 is:

Odd.

Not prime.

I am process Number xxx:

The number 22 is:

Not Odd.

Not prime.

.

.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Consider a system that consists of five processes process 0
Reference No:- TGS02910920

Expected delivery within 24 Hours