Skip to content

Instantly share code, notes, and snippets.

@ahmadyan
Last active August 29, 2015 14:21
Show Gist options
  • Save ahmadyan/b40f408b55b95abc59e0 to your computer and use it in GitHub Desktop.
Save ahmadyan/b40f408b55b95abc59e0 to your computer and use it in GitHub Desktop.
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