i dont know y my program is not working on linux system.
cout<<"enter the value of a=";
cout<<"enter the value of b=";
cout<<"enter the value of c=";
cout<<"the quadratic equation is"<<a;
(a==0 && b==0)
cout<<"not a valid equation";
(a==0 && b!=0)
cout<<"not a real root"<<endl;
i have type this code, there is no error but it says code is not working?
can anyoneo found the mistake?
Write a program that calculates the real solution of the quadratic equation: a ∗ x2 + b ∗ x + c = 0
! First, read in the values for the parameters a, b, c (all of type float).
Then, the program should calculate and display the solution considering the following scenarios:
! a = 0 and b = 0 ⇒ display error message "invalid input"
! a = 0 and b ̸= 0 ⇒ x = −c
! (b2 − 4 ∗ a ∗ c) < 0 ⇒ display error message "no real solution"
! (b2 − 4 ∗ a ∗ c) ≥ 0 ⇒ x1 = −b+√b2−4∗a∗c
2∗a , x2 = −b−√b2−4∗a∗c
Hint: The C++-function for y = √x is y = sqrt(x). Include math and use the function as in the example below:
double a = 144.0; // define and initialize variable a
cout << "Result = " << sqrt(a) << endl; // display square root of a
can you access it more normally using winscp?
pictures (esp when poorly cropped an scaled) often take up an insane amount of space for their contents. They also are difficult to police for ads or inappropriate content. An image of text is right on up there with XML for turning a couple of bytes into a couple of MILLION bytes.
and a lot of us can't (or will not) access third party sites for files.
get a local copy of your code, fix it in cygwin or something, and push it out to unix server once its working and done. Don't try to code on an unfriendly (not set up for it) server.