1.添加循环和条件分支语句
#include <iostream>
#include <string.h>
#include <mpi.h>
using namespace std;
const int max_string = 100;
int main ()
{
int comm_sz=0;
int my_rank=0;
char greeting[max_string];
MPI_Init(NULL,NULL);
MPI_Comm_rank(MPI_COMM_WORLD,&my_rank);
MPI_Comm_size(MPI_COMM_WORLD,&comm_sz);
cout<< "Hello,I am a processor , "<<my_rank<<" of "<<comm_sz<<endl;
if(my_rank!=0){
sprintf(greeting,"Sendings from process %d of %d!",my_rank,comm_sz);
MPI_Send(greeting,st