#### Essay Writing Service

Our company will be more than happy to have your paper written for you

#### Dissertation

Our custom dissertation writing service will gladly assist you

#### Research Paper Writing

Looking for information and collecting data for your research paper

#### Book Review Service

A considerable part of your grade may depend on the book review

VIEW ALL SERVICES

# MAE 9: Quiz #3, Fall 2010 Due on Wednesday, November 3rd by 21:

#### San Francisco, US

MAE 9: Quiz #3, Fall 2010Due on Wednesday, November 3rd by 21:00pm(Turnin only on Wednesday) In this quiz you will compute a two-dimensional integral by using a simplistic version of the Monte Carlo Method. This method relies on random numbers to evaluate integrals and is the method of choice for numerical integration on higher dimensions (consult your favorite Wall Street investment bank). We want to integrate the area of a circle in the plane. The circle is centered at (xc, yc) and has radius r. We will limit our search to the box delimited by the points (0,0) and (4,4). Technically we will compute the area of the intersection of the circle with this box. Consider the function:/ 1, if distance between (x,y) and (xc,yc) is less or equal than rif distance between (x,y) and (xc,yc) is greater than r The area of the intersection of the circle with the box is the double integral: area = int_{0}^{4} int_{0}^{4} ind(x, y) dx dy Our simple Monte Carlo method will compute an approximation to the above integral by drawing N uniformly distributed random points in the box (xi, yi) and computing the sum area = (16/N) * sum_{i = 1}^{N} ind(xi, yi) Write a C program (quiz3.c) that: a) Reads the double values ofxc, yc and r (circle parameters)and the integer value ofN (number of points)from the terminal by using scanf; b) If N <= 0 set N = 1000 and issue a warning message to the user; c) If r <= 0 set r = 1 and issue a warning message to the user; d) Use a for loop to generate N uniformly distributed random pointsin the box (0,0)-(4,4) and compute the approximate integral asdiscussed above; e) Print the result of the approximate integral. HINTS: The function rand() generates a uniformly distributed pseudo-random integer between 0 and RAND_MAX. Use this function and RAND_MAX to generate double points (xi, yi) in the box (0,0)-(4,4). You will need to include the header in order to use rand(). For example, the statement 10 * rand() / RAND_MAX will generate a floating point between 0 and 10 (do not forget to properly cast integers as doubles or all you will get will be zero!) The function rand() will always draw from the exact same random sequence every time you run your program (it is not a true random number, but a pseudo-random number). In order to add some “spice” to this sequence you may want to initialize rand() by calling the function srand ( time(NULL) ); also provided in . The above initialization will use the current time to set the random generator and you will get a different answer every time you run your program. You must include the header in order to use time.

## please see attached files for details on assignment and template 2

please see attached files for details on assignment and template 2

## version1 0 starthtml000000351 endhtml000042779 startfragment000041837 endfragment000042639 startselection000041841 endselection000042634 sourceurlhttps blackboard strayer edu webapps discuss 2

version1 0 starthtml000000351 endhtml000042779 startfragment000041837 endfragment000042639 startselection000041841 endselection000042634 sourceurlhttps blackboard strayer edu webapps discuss 2

## 20210920a3 assignment 30 pointsgenetics problems1 complete this table to show the difference

20210920a3 assignment 30 pointsgenetics problems1 complete this table to show the difference

Tags:

Order Now

# PLACE AN ORDER

Enter your paper details in the form below

### Multipurpose Business Child Theme for Divi

Using the Molti Multipurpose Child Theme, you can set up any kind of Website whether It’s Consulting, Agency, Renovation or Plumber, and many more. It’s ready for everything with Its Modern and Fantastic Design and Functionalities. So Take it for Spin!

Page Designs

Footer Designs

#### 50+

Element Designs

u

Get connected with a verified expert tutor 24/7.