0% found this document useful (0 votes)
26 views1 page

Calculate Roots ..?????? (I) A 1 B 2 C 1 (Ii) A 1 B 5 C 2 (Iii) A 2 B 3 C 5

1. The algorithm reads the coefficients a, b, c of a quadratic equation. 2. It calculates the discriminant and checks if it is equal to 0, positive, or negative to determine the nature and number of roots. 3. Depending on the discriminant, it then calculates the root(s) and outputs that the roots are real/complex, equal/distinct, etc.

Uploaded by

Nick
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views1 page

Calculate Roots ..?????? (I) A 1 B 2 C 1 (Ii) A 1 B 5 C 2 (Iii) A 2 B 3 C 5

1. The algorithm reads the coefficients a, b, c of a quadratic equation. 2. It calculates the discriminant and checks if it is equal to 0, positive, or negative to determine the nature and number of roots. 3. Depending on the discriminant, it then calculates the root(s) and outputs that the roots are real/complex, equal/distinct, etc.

Uploaded by

Nick
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 1

ALGORITHM TO FIND THE ROOTS OF QUADRATIC

EQUATION
1. START
2. Read the coefcients a, b,c
3. Check a=0
4. Print Equation is not Quadratic, go to ste !
5. Ca"cu"ate discr=#b
$
%&ac'
6. Check discr=0, other!"e #o to "te$ %
Ca"cu"ate root=r(=%b)$a
root$=r$=r(
Print Roots are Rea" and Equa" and #o to
"te$ &
%. Check disc*0, other+ise go to ste ,
root(=r(=%b)$a-sqrt#discr')$a
root$=r$= %b)$a%sqrt#discr')$a
Print Roots are Rea" and distinct #o to "te$
&
'. .ther+ise check #discr'/0, other+ise #o to "te$
&
Ca"cu"ate rea"0art=r(=%b)$a
C"acu"ate i1aginar2
art=r$=sqrt#abs#discr'')$
Print rea"0art-i i1aginar20art
Print rea"0art%i i1aginar20art
Print Roots are Co1"e3 and 41aginar2
&. Sto
Ca"cu"ate roots5555566777777
#i' a=( b=$ c=(
#ii' A=( b=8 c=$
#iii' a=$ b=9 c=8

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy