Last active
August 29, 2015 14:21
-
-
Save ahmadyan/b40f408b55b95abc59e0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void demo(){ | |
double r = 0.5 ; | |
double area = M_PI * r * r; | |
double** samples = new double*[sample_count]; | |
for(int i=0;i<sample_count;i++){ | |
samples[i] = new double[2]; | |
samples[i][0] = 1.0*rand()/INT_MAX; | |
samples[i][1] = 1.0*rand()/INT_MAX; | |
} | |
cout << "The exact area is " << area << endl ; | |
mc(r, samples); | |
verify(r, samples); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment