Home > Back-end >  Where is this step wrong
Where is this step wrong

Time:10-11

C language and programming problem, the following

CodePudding user response:

mathematical thinking is your solution, the present computer can't so smart,
Step by step programming language must be explicitly tell the computer what to do,
Are you telling the computer, how to put the solving out,
Not you compiled a formula, the computer will know that you want to do, maybe after the computer is,

CodePudding user response:

My suggestion is to learn c language basic grammar first,
C language syntax actually very simple, keywords but 10, 5, 6 back almost a week and back down

CodePudding user response:

Expression=0, what is this? The a * x ^ 2 + b * x + c=0 this line to remove

For example
For illegal input, LZ to handle yourself

 float a, b, c, d; 
The scanf (" % f % f % f ", & amp; A, & amp; B, & amp; C);
D=b * * a * b - 4 c.
If (d==0.0) {
Printf (" x1 x2=%=f \ n ", - b/(2 * a));
} else {
Printf (" x1=% f, % x2=f \ n ", (a - b + SQRT (d))/(2 * a), (a - b - SQRT (d))/(2 * a));
}

CodePudding user response:

The
reference 3 floor qybao response:
expression=0, what is this? The a * x ^ 2 + b * x + c=0 this line to remove

For example
For illegal input, LZ to handle yourself

 float a, b, c, d; 
The scanf (" % f % f % f ", & amp; A, & amp; B, & amp; C);
D=b * * a * b - 4 c.
If (d==0.0) {
Printf (" x1 x2=%=f \ n ", - b/(2 * a));
} else {
Printf (" x1=% f, % x2=f \ n ", (a - b + SQRT (d))/(2 * a), (a - b - SQRT (d))/(2 * a));
}

Thank you ~ this place the topic is not to say that only considering two solutions

CodePudding user response:

You don't if it is good

CodePudding user response:

Mathematical expression and programming language differences suggest review, programming has its own rules, need to brush up on the ~
  • Related