 # Solution : URI Online Judge | 1036 Bhaskara’s Formula – Solve in C++ ## Solution in C++ :

problem details : Click to see in details…  Solution : URI Online Judge | 1036 Bhaskara’s Formula – Solve in C++

First learn how to solve problem :

Define the problem. Diagnose the situation so that your focus is on the problem, not just its symptoms. Helpful problemsolving techniques include using flowcharts to identify the expected steps of a process and cause-and-effect diagrams to define and analyze root causes. Solution : URI Online Judge | 1036 Bhaskara’s Formula – Solve in C++

• Step 1: Understand the problem.
• Step 2: Devise a plan (translate).
• Step 3: Carry out the plan (solve).
• Step 4: Look back (check and interpret).             (Solutions given below:)

programming problem solving skills grow up gradually and understanding questions is the main programming problem solving techniques . problem solving steps in computer programming given up. computer problem solving can be done in

### C , C++ ,PHP , Python , Java , JavaScript

and more languages. problem solving in c is popular. programming logic building and effective problem solving is important .programmatic problem solving make you successfull.

Solve in C++:
``` #include <iostream> #include <math.h> #include<iomanip>```

using namespace std;

int main()
{
float a , b , c , r1 , r2,num;
cin >> a >> b >> c;
num = (b*b)-(4*a*c);
if(num > 0 && a!=0){
r1= (-b+ sqrt(num))/(2*a);
r2= (-b-sqrt(num))/(2*a);
cout << “R1 = “<<fixed<<setprecision(5)<<r1 << endl;
cout << “R2 = “<<fixed<<setprecision(5)<<r2 << endl;
}
else
cout<<“Impossivel calcular”<<endl;

return 0;
}