Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Solving Quadratic Equation
//fpc 3.0.0 program HelloWorld; var a,b,c,d: integer; begin writeln('Solving Quadratic Equation'); write('Enter the coefficients (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 / (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
Урок 4 задача 5
aaaaaaa
practica 9 ejercicio 6
Naloga 12: 3.9.2003
Квартира из уч. Грицановой с местоположением квартиры на этаже
Main-main
1º Questão - VS - 1º Semestre 2017
nomer9
rf cdx
Бассейн-8