Algorithm for Roots of the quadratic equation ax2 + bx + c = 0

Step 1: Start
Step 2: Declare variables a, b, c, D, x1, x2, rp and ip;
Step 3: Calculate discriminant
         D ← b2-4ac
Step 4: If D ≥ 0
              r1 ← (-b+√D)/2a
              r2 ← (-b-√D)/2a 
              Display r1 and r2 as roots.
        Else     
              Calculate real part and imaginary part
              rp ← -b/2a
              ip ← √(-D)/2a
              Display rp+j(ip) and rp-j(ip) as roots
Step 5: Stop             

Are there any code examples left?
Create a Free Account
Unlock the power of data and AI by diving into Python, ChatGPT, SQL, Power BI, and beyond.
Sign up
Develop soft skills on BrainApps
Complete the IQ Test
Relative searches
find the roots of the quadratic equation a(x2+1)+(a2+1)x=0 one of the roots of the equation x^2+kx-6=0 is 3 determine the condition for the roots of the equation ax2+bx+c=0 to differ by 2 If 'a' and 'b' are the roots of the equation x2 + x + 1 = 0, then a2 + b2 = The roots of quadratic equation 2x² + x + 4 = 0 are: (a)Positive and negative (b)Both Positive (c)Both Negative (d)No real roots The roots of quadratic equation 2x² + x + 4 = 0 are The roots of quadratic equation 4x^2 -12 x +9 = 0 are: Write a program to find the real roots of the quadratic equation ax2 + bx + c = 0 where a, b and c are constants Without solving the following quadratic equation, find the value of ‘p’ for which the given equation has real and equal roots (p + 1)x2– 4px + 9 = 0 if a and b are the roots of the equation ax2+bx+c=0 then the sum of roots of the equation a2x2 if a and b are the roots of the equation ax2+bx+c=0 then the sum of roots of Find the roots of the polynomials below. (a) P(z) = z2 + a for a > 0 if the two roots of the equation (a-1)(x^4+x^2+1)+(a+1) the roots of quadratic equation x2-x-2=0 by false met Find the roots of the quadratic equation 6x2 -11x-35=0 find the two roots of the quadratic equation ax2+bx+c=0 (a is not equal to 0) how to find the two roots of a quadratic equation ax2+bx+c=0 (a is not equal to 0 how to find the two roots of a quadratic equation ax2+bx+c=0 the sum of the roots of the quadratic equation 3x2-9x+5=0 find the roots of the quadratic equation ax2+bx+c=0. use scanner if the roots of the equation 3ax^2+2bx+c=0 has if a and b are the roots of the equation x2-bx+c then what are the roots of the equation cx2+(b2-2c)x + c If the roots of the quadratic equation 2x^2+kx+8=0 are equal, the value of k^2+k+1 equals Find the roots of the Quadratic Equation ax2+bx+c=0. use scanner if the roots of the equation ax^2-x+b=0 are real and distinct roots of x2-4rootab write a c program to find the roots of a quadratic equation ax2 + bx + c = 0 Find the roots of the following quadratic equations by completing square method: 2x2 + x – 6 = 0 if the roots of the equation ax^2 _ 2bx _ c = 0 and bx^2 - 2rotac + b = 0 are simultaneously real, then if the roots a and b of the quadratic equation x^2-sqrt2x-c are complex for some real number JEE if the roots a and b of the quadratic equation x2-5x+3(k-1) are complex for some real number JEE if a and b are the roots of x^2-px+q=0 then find the equation The equation for the quadratic function with Roots of x = -2 and x = -5, passing through (-1,8), is written in the form y=ax2+bx+c. Determine the values of a, b, and c if a,b are roots of the equation 7x^2 + 9x-2=0 find their position if the roots of the equation x3+ax2+bx+c = 0 are in ap if the roots of the equation x3+ax2+bx+c = 0 If the roots of quadratic equation 2x² + kx + 8 = 0 are equal value of k² + k + 1 equals If x1 , x2 are the roots of ax2 + bx + c = 0, find the value of (1) (ax1 + b)–2 + (ax2 + b)–2 (2) (ax1 + b)–3 + (ax2 + b)–3 Find the roots of the quadratic equation: 2 x2(2 x square)+ 3x - 9 = 0? A. 3, -3/2 B. 3/2, -3 C. -3/2, -3 D. 3/2, 3 find the condition if the sum of roots of the equation ax2-bx-c is equal to product of its roots the roots of the equation ax2+x+b=0 are equal if Write a program that asks three coefficients of a quadratic equation ax2 + bx + c = 0 and find real roots of the equation. If roots are imaginary, display the message “Roots are imaginary”. if a and b are the roots of the equation ax2+bx+c=0 if cx^2 + qx + r =0 has roots 1-a/a and 1-b/b, then r is equal to roots of the quadratic equation a^2b^2x^2 - (a^2 + b^2)x + 1 = 0 Design an algorithm to determine the roots of the quadratic equation ax2 + bx + c using the quadratic formula show the quadratic equation 2mx^2-(m+n)x+1/2n=0 has 2 different real roots the roots of 2x 2 3x 5 0 are p and q find all quadratic equation with roots p^2+q and q^2+p Which of the following is a quadratic equation with roots -3/4 and 1/2 ? * 8x²-2x-3=0 Which of the following is a quadratic equation with roots -3/4 and 1/2 ? * 8x²-2x-3=0 8x²+5x+3=0 8x²+2x-3=0 8x²+5x-3= If the roots of ax2 + bx + c = 0 are in the ratio m : n, then roots of quadratic equation 6x^2-23x-21=0 are roots of quadratic equation 6x^2-21x-23=0 are If a and b are the roots of the equation x2 +ax –b = 0, then find a and b. if the equation ax^2+bx+c=0 has imaginary roots then Given a quadratic equation in the form ax2 + bx + c. Find its roots. quadratic equation $ax^2 + bx + c$ has roots $\alpha, \beta$. Find a quadratic equation with the roots $1 - \frac{1}{\alpha}, 1 - \frac{1}{\beta}$. using the quadratic formula, the roots 2x^2 /+ 5 under 3 find the roots of the quadratic equation 2x^2+3x-9=0 Form a quadratic polynomial whose sum of the roots is (-7)/2 and product of the roots is 3/2 if both the roots of the equation x2 -2kx+k2+k-5=0 write a c++ program to find the roots of a quadratic equation ax2 + bx + c = 0 if both the roots of the quadratic equation x^2-(2k+1)x+9k-5=0 if both the roots of the quadratic equation x^2-2kx+k^2+k-5=0 for what value of k are the roots of the quadratic equation 3x^2+2kx+27=0 A quadratic equation ax2 + bx + c = 0 has non-real roots, if If a and b are roots of x^2 - 3x + 2 then the equation whose roots are a^6 and b^6 is : develop a c++ program to find all roots of a quadratic equation ax2+bx+c=0 The roots of the quadratic equation 2x2 - x - 6 = 0 are a quadratic equation ax2+bx+c=0 has non-real roots if a quadratic equation ax2+bx+c=0 has no real roots let x1 x2 be the roots of the equation ax^3+bx+c=0 if the roots of the equation ax^2+2bx+c =0 Given a quadratic equation in the form ax2 + bx + c. Find its roots. gfg if the roots of the quadratic equation (x-a)(x-b) If the roots of equation x2 +bx +c = 0 differ by 2, then which of the following is true? if a and b are the roots of ax2+bx+c=0 then match the following if the roots of the equation x^2+ax+b=0 are c and d if roots of equation x^2+ax+b=0 algorithm for Roots of the quadratic equation ax2 + bx + c = 0
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source