C language finds the wrong question, C language one question is wrong

Updated on technology 2024-04-11
3 answers
  1. Anonymous users2024-02-07

    #include

    #include

    void main()

    float a,b,c,answer,answer1,q;

    scanf("%f",a);

    scanf("%f",b);

    scanf("%f",c);

    q=b*b-4*a*c;

    if(q<0) is less than zero and has no real root.

    printf("no.");

    else if(q = 0) is a case of a real root.

    answer = -b / (2 * a);

    printf("%f",answer);

    elseanswer =( -b + sqrt(q) )/ (2 * a );

    answer1 = (-b - sqrt(q) )/ (2 * a );

    if(answer1>answer)

    printf("%f%f",answer1,answer);

    elseprintf("%f%f",answer,answer1 );

    It's easier that way.

    I don't have a compiler, if there are minor errors, I can fix them myself.

    First determine whether there are solid roots.

    Then determine the number of real roots.

    Finally, if there are two real roots, the calculation begins.

    If the second if you have the second if, the first if will definitely not be executed.

    So the root of the output e is also incorrect. The next output doesn't have the result of e.

    So as long as the first if is not true, the correct result will not be output.

    If the random number in d is not 0. Always output NO.

  2. Anonymous users2024-02-06

    It feels like it's right, and I don't know what's wrong?

  3. Anonymous users2024-02-05

    3 is understood to mean that except for the three characters a, i, and a, other characters cannot be isolated characters alone, such as: dds a daks is legitimate, and replacing the middle single a with i or a it is still legal, if it is replaced by something else, it is not legal.

    4. It is understood as if there are two punctuation marks connected for example, ,!?It's not legal, and if it is? "is valid because in the second example one of the two punctuation marks is a double quote.

    If there's anything you don't understand, you can hi me.

Related questions
4 answers2024-04-11

2. 1, True 2, False (there is only one program) 3, False (not necessarily) 4, True. >>>More

4 answers2024-04-11

I want to write it to you! It's a pity that I'm off work, hehe.

9 answers2024-04-11

It should be 0It should be a remainder operation.

8 answers2024-04-11

It's nonsense to say so much above. Landlord please see: pay attention to your program: printf("%d,%d",(a,b),(b,a); >>>More

15 answers2024-04-11

ints need to be expressed according to the size of the compiler. >>>More