0
124kviews
Draw the flowchart for finding the roots of quadratic equation. Write the program for same.

Mumbai university > FE > SEM 2 > Structured Programming Approach

Marks: 10M

Year: Dec 2018

1 Answer
2
124kviews

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.

enter image description here

Please log in to add an answer.

Continue reading...

The best way to discover useful content is by searching it.

Search