Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
quadratic equation
program quadratic equation; var a,b,c,d; integer; begin writeln('solving Quadratic Equation'); write(enter first coefficient (A, B, C): '); readln(a,b,c); d :-b*b - 4*a*c; if a - 0 then writeln('this is not a quadratic equation.') else if d < 0 then writeln('no real roots.') else if d - 0 then writeln('double roots. x - ', ((-b + sqrt(d)) / (2*a)):5:2) else {d > 0, two real roots} writeln('Two real roots x = ', (-b + sqrt(d)) / (2*a)):5:2, ', ',(-b - sqrt(d) /(2*a):5:2); end.
run
|
edit
|
history
|
help
0
basketball_player_training
practica 3 ejercicio B6
Mon ami Simon
Fb password
tabeliran polinom
practica 2 ejercicio 6
zadacha6
2
hello world
ax+by=n