fork download
  1. program q_210540617_3;
  2. var
  3. a, b, c, x1, x2, d : real;
  4. begin
  5. read(a, b, c);
  6.  
  7. d := b*b - 4*a*c;
  8. x1 := (-b - sqrt(d))/(2*a);
  9. x2 := (-b + sqrt(d))/(2*a);
  10.  
  11. writeln('[', x1, ', ', x2, ']');
  12. end.
Success #stdin #stdout 0s 336KB
stdin
2 4 -2
stdout
[-2.4142135623730949E+000,  4.1421356237309515E-001]