fork download
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main(void) {
  5. double a, b, c;
  6. if (scanf("%lfx^2+%lfx+%lf=0", &a, &b, &c) != 3)
  7. exit(EXIT_FAILURE);
  8. return printf("%f %f %f\n", a, b, c) < 0;
  9. }
  10.  
Success #stdin #stdout 0s 4252KB
stdin
21x^2+3x+5=0
stdout
21.000000 3.000000 5.000000