Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <math.h>
- using namespace std;
- int main()
- {
- int a, b, c;
- double delta, x1, x2;
- cout << "introduceti coeficientii ec. de gr.2";
- cin >> a;
- cin >> b;
- cin >> c;
- delta = b * b - 4 * a * c;
- x1 = (-b + sqrt(delta))/(2 * a);
- x2 = (-b - sqrt(delta))/(2 * a);
- cout << x1 << " " << x2 << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment