#include <iostream>
#include <cmath>
using namespace std;
int main()
{
double a1, b1, c1, a2, b2, c2;
cin >> a1 >> b1 >> c1 >> a2 >> b2 >> c2;
double y = (c2*a1 - a2*c1)/(a1*b2 - a2*b1);
double x = (c1 - b1*y)/a1;
cout << "x: " << x << endl;
cout << "y: " << y << endl;
}
No comments:
Post a Comment