Please Help Alter Code Calculates Pi Without Declaring Pi Satisfy Requirements Include Mpi Q37144110

Please help me alter this code so that it calculates pi withoutdeclaring pi and satisfy these requirements

MPIArea of square 4r2 Area of circle pir2 Ratio of area of circle to the square is pi/4 circle M4(M/N) will converge to pi as

#include “mpi.h”#include <math.h>int main(argc,argv)int argc;char *argv[];{ int done = 0, n, myid, numprocs, i; double PI25DT = 3.141592653589793238462643; double mypi, pi, h, sum, x; MPI_Init(&argc,&argv); MPI_Comm_size(MPI_COMM_WORLD,&numprocs); MPI_Comm_rank(MPI_COMM_WORLD,&myid); while (!done) {

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.