CodePudding user response:
Seems to be no problem, I according to test result is right you contrast: is there any difference between your code and see# include & lt; stdio.h>
#include
Int main ()
{
Double a, b, c, disc, x1, x2, p, q);
The scanf (" % % lf, lf, % lf ", & amp; A, & amp; B, & amp; c);
Disc=b * * a * b - 4 c.
P=b/(2 * a);
Q=SQRT (disc)/(2 * a);
X1=p + q;
X2=p - q;
Printf (" % 5.2 lf % 5.2 lf \ n ", x1, x2);
return 0;
}
CodePudding user response:
What I use c + +, but similar resultsCodePudding user response:
Should be no problem, as the upstairs said, code VS2015 c + + environment testIt is important to note that the should have a comma between the input data,
For printf () function of the output format, please refer to the "c + + printf () function in the usage of the 10-8" "c + + printf () function USES 10 to 9"
Wish I could help you!