In the following scheme, to what value does 'co' converge for large N?>N=10,000count=0for i=1:N y = rand(1,1) x = rand(1,1)r = sqrt(x*x+y*y)if (r

🎲 Try a Random Question  |  Total Questions in Quiz: 64  |  🧠 Study this quiz with Flashcards
This question is part of a full practice quiz:
ME101: Final Exam - Introduction to Mechanical Engineering — practice the complete quiz, review flashcards, or try a random question.

MCQs on the basics of Mechanical Engineering.


In the following scheme, to what value does 'co' converge for large N?<br>>N=10,000<br>count=0<br>for i=1:N<br> y = rand(1,1)<br> x = rand(1,1)<br>r = sqrt(x*x+y*y)<br>if (r <= 1.0)<br>count = count +1<br>end<br>end<br>co = 4*count/N<br/><br/>