QUADRATIC FORMULA CODES

hello, am new in c++, i have tried to code the quadratic formula but surferring from several error. please can some one put me true?
Could you please show us what you have done so far...

There's not really much to it as long as you know basic operators in C++ and input/output stream

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include<iostream>
#include<cmath>

using namespace std; 

int main()
{
    // Declare variables
    // Ask user to input values for a, b, and c
    // Read these variables
    // Do something with them
    // Output the two solution
    return 0;
}
Last edited on
dear, the major problem is how to code for the square root. But i can still show you the code if you prefare that. thanks.
Yes, please put the code so I can know what the problem is.

Anyway, for square root: double bla = pow((double) blabla, 0.5);.
Last edited on
ok brother. but please bear with me coz my battery is almost down, and am from nigeria (no sufficint light), so i'll do so wen charged. Thankz man.
here is some help for you read it out...
http://www.cplusplus.com/forum/beginner/9735/
Thank you. I now understand.
Topic archived. No new replies allowed.