ayushpoudel833 ayushpoudel833
  • 21-06-2021
  • Computers and Technology
contestada

write an algorithm to find perimeter of circle
​

Respuesta :

sk5634943
sk5634943 sk5634943
  • 28-07-2021

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:

Answer Link

Otras preguntas

HELP ME PLEASE !!!!!!! Suppose g(x) = f(x-3) -4. Which statement best compares the graph of g(x) with the graph of f(x)? A. The graph of g(x) is shifted 3 units
Could someone answer the rest please! Much appreciated if you do (:
Question 31 Who is the protagonist in "At the Theatre"? by AP Herbert​
1.write the chemical equation for transpiration 2.what is translocation ??,give the chemical equation for translocation plss help will mark brainlest.. ​
Explain how the scenario below illustrates a lack of understanding of the importance of quality control. Situation: Tomas is the manager of a local restaurant.
performance apraisals of employees
How many moles of na2so4 are present in 284.078 grams of na2so4? a. 2 b. 3 c. 5 d. 6
With the use/abuse of alcohol, there is a buildup of fatty tissues in the heart muscle true false
How are a mole and a dozen similar?
PLEASE ANSWER WILL MARK BRAINLIST