Quadratic Equations Algorithm Flowchart
Use immediately

Quadratic Equations Algorithm Flowchart

int term2(int a, int b, int c);

int a, b, c;

float root1, root2, t1, t2, t3;

Read coefficients

cin >>a

cin>>b

cin>>c

Start

r < 0?

Initialize root variables

root1 = root2 = 0.0;

compute t1 value

t1 = -1*b;

compute t2 value

t2 = call function term2(a,b,c)

compute t3 value

t1 = sqrt 9t2);

print results

Stop

int term2(intx, inty, intz)

int p = y*y,

int q = 4*x*z;

int r = p-q;

print "no real root"

compute root 1 and root2 values

root1 = (t1+t3)/2a;

root2 = (t1+t3)/2a

r == 0?

print "only one root"

R > 0?

print "two real roots"

return r

No

No

No

18
0
0
publish time: 2021-07-16
Charlotte

A quadratic equation is an equation that can be rearranged in standard form as ax^2 + bx + c = 0, where x represents an unknown, and a, b, and c represent known numbers, where a is not equal to zero. If a is equal to zero, the equation is linear, not quadratic, as there is no ax^2 term. The numbers a, b, and c are coefficients of the equation and may be distinguished by calling them. As the below algorithm suggests, the values of x that satisfy the equation are called solutions of the equation and roots or zeros of the expression on its left-hand side. A quadratic equation has at most two solutions. If there is no real solution, there are two complex solutions.

See More Related Templates