/* Monte Carlo integration of PI by sample mean */ #include
#include
#include
int main() { double x, pi, sum = 0.0; int try, ntry; printf("Input the number of MC trials\n"); scanf("%d",&ntry); srand((unsigned)time((long *)0)); for (try=0; try