0

2

**Step Form Algorithm:**

- Start.
- Declare the required variables.
- Indicate the user to enter the coefficients of the quadratic equation by displaying suitable sentences using printf() function.
- Wait using the scanf() function for the user to enter the input.
- Calculate the roots of quadratic equation using the proper formulae.
- Display the result.
- Wait for user to press a key using getch() function.
- Stop.

**Pseudo Code Algorithm:**

Start.

Input a, b, c.

D ← sqrt (b × b – 4 × a × c).

X1 ← (-b + d) / (2 × a).

X2 ← (-b - d) / (2 × a).

Print x1, x2.

Stop.

**Flowchart:**

Flowchart to calculate the roots of quadratic equation is shown below in figure 3.

2

ADD COMMENT

Please log in to add an answer.