write an algorithm to find perimeter of circle

Answers

Answer 1

Answer:

Here’s one!

Given [math]R[/math], the radius of the circle.

Let [math]N,D\leftarrow 0[/math]

Repeat until [math]D[/math] is large enough (about 1,000,000)

[math]x,y\leftarrow U[0,1][/math]

If [math]x^2 + y^2\le 1[/math] then [math]N\leftarrow N+1[/math]

[math]D\leftarrow D+1[/math]

[math]P\leftarrow\frac{8NR}{D}[/math]

Return [math]P[/math]

[math]U[0,1][/math] is a uniform random number in the range [math][0,1][/math].

Explanation:


Related Questions

State two pieces of information that need to be labeled on the idea development sketch. 1 .________________________________________________. 2 .___________________________________________.​

Answers

Answer:

Design drawings should show details on layout, measurements, plan, cross-sectional and vertical profiles. This information is prepared as scale drawings of the works to be constructed. they are legible  they include all information from previous revisions and updates.

Explanation:

Other Questions
Whose definition of justice left no room for moral interpretation?a-Cephalusb-Thrasymachusc-Polymarchusd-Adeimantus Why are the danzante figures such an important find?Fr help a brother out no links pls Algebrawrite down the coefficient of x in 3(x)4xA 12B 3C 0by Emmanuel okorie Which excerpt from First Generation of Dreaming in Cuban is the best example of magic realism?The family split up and Minnie was raised by a grandmother who can quote the Bible chapter and verse and drives a beat-up Cadillac with a CB radio in it.We camped out under a sapodilla tree and listened to the pygmy owls with their old womens voices.Four blocks from her home, Lourdes smells her fathers cigar behind a catalpa tree. Mi hija, have you forgotten me? Jorge del Pino chides gently.She combs her daughters room for the Jimi Hendrix poster she made her take down and tacks it back on the wall. 3384/24 step by step ......I really need help What book helped convince the colonists and the Congress that the United States should be independent from England? Vit cc ly tha sau di dng mt ly tha hoc cc tch cc ly tha c s nguyn v s nguyn A.8 m 2 B. 654 Yulet rolls 2 fair dice and adds the results from each. Work out the probability of getting a total that is a factor of 24. Explain the difference between uninsured and underinsured. It's a quartile question. Suppose there are 3 molecules in a container. If each molecule has a 1-in-2 chance of being in the left half of the container, what is the probability that there are exactly 2 molecules in the left half of the container? Of the following fractions: 9/19, 5/11, 7/15, and 11/23, which is the largest? Provide three critical evaluations of your own contribution to environmental health and safety Choose the appropriate term for each labeled part of the image. Label A Label B Label C Label D A heat engine with 0.100 mol of a monatomic ideal gas initially fills a 3000 cm3 cylinder at 800 K. The gas goes through the following closed cycle Isothermal expansion to 5000 cm3 ? Part A How much work does this engine do per cycle? Express your answer with the appropriate units. sochoric cooling to 200 K -Isothermal compression to 3000 cm3. - Isochoric heating to 800 K Value Units Part B What is its thermal efficiency? Express your answer with the appropriate units. The equation of the line passing through (2, 3) with a slope of 5 is y = [] x - [] what are the answers to [] Please help Ill give brainliest Science is concerned with explaining natural phenomena, based on observation, experiments, and evidence. Other questions are best answered by using other forms of knowledge and understanding, such as art, philosophy, or religion. Read each topic and select the topics for Science. Select ALL that apply. behavior of alligatorsmeaning of existenceblack holesdeep-sea ventsthe Aurora Borealis (Northern Lights)ghosts, goblins, and other creatures in stories Use a net to find the surface area of the coneto the nearest square centimeter. Use 3.14 for20 cmTT. Solve for x.3:12 = x:166442 1/4