Professional Documents
Culture Documents
Eee515 Assignment
Eee515 Assignment
PROGRAM: EEE
COURSE: EEE515
ASSIGNMENT
Draw a flowchart to find the real roots of the equation a x 2 +bx +c=0 where a, b, c are real using the equation.
SOLUTION
1. Start
2. Initialize n=0
3. Increment n by 1 and assign value to n
4. Input values a n , b n , c n
5. Read values a n , b n , c n
2
6. Compute d=bn−4 a n cn
7. If d >0 then ,
−b+ √ d
x n 1=
2a
−b− √ d
x n 2=
2a
print x n1 , x n2 . values
9. else if d< 0
Print roots are Imaginary
10. If n=10 then
STOP
else go ¿ step3
FLOWCHART
START
n=0
n=n+1
2
Compute d=bn−4 a n c n
TRUE FALSE
Is d> 0
FALSE TRUE
Is d=0
Compute
−b+ √ d
x n 1=
2a Print roots are Compute
−b− √ d imaginary −b
x n 2= x n 1=
2a 2a
−b
x n 2=
2a
Print x n 1 , x n 2
Print x n 1 , x n 2
NO
Is n=10
YES
Stop