#include <iostream>
#include <mpi.h>
using namespace std;

 
int main(int argc, char* argv[])
{
int my_rank;
int A[20];
int N;


    MPI_Init(&argc, &argv);

    MPI_Comm_size(MPI_COMM_WORLD, &N);
    cout << N << " Processes running in the systen\n"; 
    MPI_Comm_rank(MPI_COMM_WORLD, &my_rank);
 
    cout << "my rank:" << my_rank << endl;
    for (int i=0; i<5;i++) A[i]=i+my_rank*5;
    for (int i=0; i<5;i++) cout << A[i] << " "; cout << endl;
    
 
    MPI_Finalize();
 
    return EXIT_SUCCESS;
}
