answersLogoWhite

0

program kvadratine;

var a,b,c:integer;

D: real;

begin

writeln('iveskite kvadratines lygties Ax^2+Bx+C=0 koeficientus A B C');

readln(a,b,c);

D:=b*b - 4*a*c;

if D<0 then

writeln('Nera sprendiniu')

else if D=0 then

writeln('D=0, taigi:', 'x1 = ',(-b)/2*a:0:2)

else

writeln('D>0, taigi: ','x1=',(-b+sqrt(D))/2*a:0:2,' x2=',(-b*sqrt(D))/2*a:0:2);

end.

User Avatar

Wiki User

12y ago

Still curious? Ask our experts.

Chat with our AI personalities

CoachCoach
Success isn't just about winning—it's about vision, patience, and playing the long game.
Chat with Coach
MaxineMaxine
I respect you enough to keep it real.
Chat with Maxine
ReneRene
Change my mind. I dare you.
Chat with Rene

Add your answer:

Earn +20 pts
Q: Pascal codes that solve the roots of quadratic equations?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Math & Arithmetic

What is the difference between a radical equation and a quadratic equation?

radical equations have sq roots, cube roots etc. Quadratic equations have x2.


What are quadratic equations with real roots?

If the discriminant of the quadratic equation is zero then it will have 2 equal roots. If the discriminant of the quadratic equation is greater than zero then it will have 2 different roots. If the discriminant of the quadratic equation is less than zero then it will have no roots.


Is it possible for two different quadratic equations to have the same roots?

yes


Can all quadratic equations be solved?

Well, that depends on what you mean "solve by factoring." For any quadratic equation, it is possible to factor the quadratic, and then the roots can be recovered from the factors. So in the very weak sense that every quadratic can be solved by a method that involves getting the factors and recovering the roots from them, all quadratic equations can be solved by factoring. However, in most cases, the only way of factoring the quadratic in the first place is to first find out what its roots are, and then use the roots to factor the quadratic (any quadratic polynomial can be factored as k(x - r)(x - s), where k is the leading coefficient of the polynomial and r and s are its two roots), in which case trying to recover the roots from the factors is redundant (since you had to know what the roots were to get the factors in the first place). So to really count as solving by factoring, it makes sense to require that the solution method obtains the factors by means that _don't_ require already knowing the roots of the polynomial. And in this sense, most quadratic equations are not solvable through factoring.


What are the roots of a quadratic?

The roots of a quadratic function are where the lies interescts with the x-axis. There can be as little as zero.