Programming Fundamentals

Exercise 1

Problem: Find the root of algebraic using

algorithm:

            1. Input a, b, c
            2. Compute t1 = b * b - 4 * a * c
            3. Compute t2 = SQRT(t1)
            4. Compute t3 = 2 * a
            5. Compute x1 = (-b -t2) / t3
            6. Compute x2 = (-b + t2) / t3
            7. Print x1 , x2
            8. STOP

Flowchart