implicit double precision(a-h,o-z)
write(*,*) "please provide the a,b,c coeff"
read(*,*) A,B,C
D=B*B-4*A*C
if(D.GT.0) then
root1=(-B/(2*A))+(SQRT(D))/(2*A)
root2=(-B/(2*A))-(SQRT(D))/(2*A)
write(*,*) root1,root2
elseif(D.EQ.0) then
root1=(-B/(2*A))
root2=root1
write(*,*) root1,root2
else
root1=(-B/(2*A))+(SQRT(-D))/(2*A)
root2=(-B/(2*A))-(SQRT(-D))/(2*A)
a=(root1+root2)/2
b=(root1-root2)/2
write(*,*) 'realpartroot=',a, 'complexpartroot=',b
endif
stop
END
computer scince
ax2 + bx + c
Write the quadratic equation in the form ax2 + bx + c = 0 The roots are equal if and only if b2 - 4ac = 0. The expression, b2-4ac is called the [quadratic] discriminant.
To express the equation (2x^2 + 3x + 90) in standard quadratic form, we can simply write it as (2x^2 + 3x + 90 = 0). This represents a quadratic equation where (a = 2), (b = 3), and (c = 90). The equation can be solved for (x) using the quadratic formula or factoring, if applicable.
First, write the equation in standard form, i.e., put zero on the right. Then, depending on the case, you may have the following options:Factor the polynomialComplete the squareUse the quadratic formula
dejene
Write an algorithm to find the root of quadratic equation
2000X=Y2KoverZzz?
readuse the answer
Solve simple intress usin fortran
An example of a quadratic equation is ( ax2 bx c 0 ), where ( a ), ( b ), and ( c ) are constants and ( x ) is the variable.
computer scince
ax2 + bx + c
Write the quadratic equation in the form ax2 + bx + c = 0 then the roots (solutions) of the equation are: [-b ± √(b2 - 4*a*c)]/(2*a)
Write the quadratic equation in the form ax2 + bx + c = 0 The roots are equal if and only if b2 - 4ac = 0. The expression, b2-4ac is called the [quadratic] discriminant.
Yes. The FORTRAN write command output's data to a file.
First, write the equation in standard form, i.e., put zero on the right. Then, depending on the case, you may have the following options:Factor the polynomialComplete the squareUse the quadratic formula