anyone who can help me fix this c++ code,kindly? It was to solve the real roots of a quadratic equation.
#include <iostream> #include<cmath> using namespace std; int main() { //quadratic eqn is in form of a*a + 2*a +c // our a*a will be unknown_a //our 2*a will be unknown_b //our c will be num_c double unknown_a, unknown_b, num_c, real_roots,real_root2; cout << "enter the first unknown" << endl; cin >> unknown_a; cout << "enter the second unknown" << endl; cin >> unknown_b; cout << "enter the third value(C)" << endl; cin >> num_c; real_roots=- unknown_b+ ( sqrt((unknown_b*unknown_b)-(4*unknown_a*num_c))/2*unknown_a); cout << "root one is:"; cout << real_roots<<endl; real_root2=- unknown_b-( sqrt((unknown_b*unknown_b)-(4*unknown_a*num_c))/2*unknown_a); cout << "root two is:"; cout << real_root2; return 0; }