A root is a value of x that make the equation equal to zero. You probably rememb
ID: 3673215 • Letter: A
Question
A root is a value of x that make the equation equal to zero. You probably remember from your early years, that the quadratic formula can tell you the roots of the equation. But for this lab, you will write an algorithm that allows the computer to find the root using a guess and check method. You code cannot use any intrinsic functions except for the function that generates a random integer number (from -100 to 100) to guess the root. Your code needs to use a while loop and should count how many guesses it took to get the right answer.
Thanks for any and all help.
Explanation / Answer
count = count + 1
guess = (b-a).*rand(1,1) + a;
end
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.