Go: package main

import (
	"fmt"
)

func main() {
	for {
		var a, b, c, d, e, f float64
		i, _ := fmt.Scan(&a, &b, &c, &d, &e, &f)
		if i == 0 {
			break
		}

		y := (c*d - a*f) / (b*d - a*e)
		x := (c - b*y) / a

		fmt.Printf("%.3f %.3f\n", x, y)
	}
}

C++: #include <cstdio>

int main()
{
        float A[2][2], B[2];

        while (scanf("%f %f %f %f %f %f",
                                 &A[0][0], &A[0][1], &B[0],
                                 &A[1][0], &A[1][1], &B[1]) != EOF) {
                float det = A[0][0] * A[1][1] - A[0][1] * A[1][0];
                float invA[2][2];
                invA[0][0] = A[1][1] / det;
                invA[0][1] = -A[0][1] / det;
                invA[1][0] = -A[1][0] / det;
                invA[1][1] = A[0][0] / det;
                float ans[2] = {0, 0};
                for (int i = 0; i < 2; i++) {
                        for (int j = 0; j < 2; j++) {
                                ans[i] += B[j] * invA[i][j];
                        }
                }

                printf("%.3f %.3f\n", ans[0], ans[1]);
        }
        return 0;
}

C++: #include <iostream>
#include <cstdio>
using namespace std;

int main(){
double a,b,c,d,e,f;
double x,y;

while(cin >> a >> b >> c >> d >> e >> f){
y = (f*a-c*d)/(e*a-b*d);
x = (c-b*y)/a;
printf("%.3lf %.3lf\n",x,y);
}
}

C++: #include <iostream>
#include <sstream>
#include <iomanip>
using namespace std;

int main() {
    string line;
    while (getline(cin, line)) {
        int a, b, c, d, e, f;
        stringstream ss(line);
        ss >> a >> b >> c >> d >> e >> f;


        double x = 0.0;
        if (c*e - b*f != 0)
            x = static_cast<double>(c*e - b*f) / (a*e - b*d);
        double y = 0.0;
        if (a*f - c*d != 0)
            y = static_cast<double>(a*f - c*d) / (a*e - b*d);
        cout.setf(ios_base::fixed, ios_base::floatfield);
        cout << std::setprecision(3) << x << " " << y << endl;
    }
}

C++: #include <iostream>
#include <iomanip>
using namespace std;

int main(){
	double a[6];
	double x,y;
	while(true){
		cin >> a[0];
		cin >> a[1];
		cin >> a[2];
		cin >> a[3];
		cin >> a[4];
		cin >> a[5];
		if(cin.eof())
			break;
			
		x = (a[4]*a[2]-a[1]*a[5])/(a[0]*a[4]-a[1]*a[3]);
		y = (-a[3]*a[2]+a[0]*a[5])/(a[0]*a[4]-a[1]*a[3]);
		
		cout << setprecission(3) << x << " " <<setprecision(3) << y << endl;
	}
	return 0;
}

C++: #include<cstdio>
#include<iostream>
using namespace std;

int main(){
	double a,b,c,d,e,f,x,y;

	while(cin >> a >> b >> c >> d >> e >> f){
	x=(int)((c*e-b*f)/(a*e-b*d)*1000) / 1000.0;
	y=(int)((a*f-c*d)/(a*e-b*d)*1000) / 1000.0;
	printf("%.3f %.3f\n", x,y);
}
	return 0;
}

C++: #include<stdio.h>
int main(){
	int X,Y;
double a,b,c,d,e,f,x,y;
double p[2][3]={0};
y=0;x=0;
while(scanf("%lf",&a)!=0){
scanf("%lf",&b);scanf("%lf",&c);
scanf("%lf",&d);scanf("%lf",&e);scanf("%lf",&f);
y=(d*c-a*f)/(b*d-a*e);
x=(e*c-b*f)/(e*a-b*d);
X=x*10000;
Y=y*10000;
if((X)%10>=5)x+=0.0005;
else if((X)%10<=-5)x-=0.0005;
if((Y)%10>=5)y+=0.0005;
else if((Y)%10<=-5)y-=0.0005;

printf("%.3f %.3f\n",x,y);
}
return 0;
}

C++: #include <iostream>
#include <cstdio>

using namespace std;

int main(int argc, char *argv[]) {
  double a, b, c, d, e, f;

  while (true) {
    cin >> a >> b >> c >> d >> e >> f;
    if (cin.eof())
      break;
    a -= d * b / e;
    c -= f * b / e;
    double x = c / a;
    if (x >= 0)
      x = (int)(x * 100 + 0.5);
    else
      x = (int)(x * 100 - 0.5);
    x /= 100;
    double y = (f - d * x) / e;
    if (y >= 0)
      y = (int)(y * 100 + 0.5);
    else
      x = (int)(y * 100 - 0.5);
    y /= 100;
    printf("%.3lf %.3lf\n", x, y;
  return 0;
}

C++: #include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <ctime>
using namespace std;

typedef long long ll;
typedef pair<int, int> P;

#define all(c) (c).begin(), (c).end()
#define pb push_back
#define mp make_pair
#define EXIST(v,i) (find(all(v), i) != (v).end())
#define ERASE(v,i) (v).erase(remove(all(v), i), (v).end())
#define INDEX(v,i) (find(all(v), i) - (v).begin())
#define rep(i,n) for(int i = 0; i < (int)n; ++i)
#define debug(x) cerr << #x << " = " << (x) << endl;

inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}

const int INF = 100000000;
const double PI = 3.14159265358979323846;
const double EPS = 1e-10;

int main() {
	string line;
	while(getline(cin, line)) {
		double a, b, c, d, e, f;
		{
			istringstream is(line);
			is >> a >> b >> c >> d >> e >> f;
		}
		double multi = b / e;
		double x = ((c - f * multi) - (b - e * multi)) / (a - d * multi);
		double y = (c - (a * x)) / b;
		printf("%.3f %.3f\n", x, y);
	}
	return 0;
}

C++: 
#include<iostream>
#include<iomanip>

using namespace std;

double solutionY();
double solutionX(double);
double a1,b1,c1,d1,e1,f1;

int main(){
  
  while(cin){
    cin >> a1 >> b1 >> c1 >> d1 >> e1 >> f1;
    double x,y;
    
    y = solutionY();
    x = solutionX(y);
    
    cout << fixed << setprecision(3) << x << " " << y << endl ; 
  }
  return 0;
}

double solutionY(){
  double b,c,e,f;
  b = b1/a1;
  c = c1/a1;

  e = e1/d1;
  f = f1/d1;
  
  return (c - f)/(b - e);
}

double solutionX(double y){
  double b,c;
  b = b1/a1;
  c = c1/a1;
  
  return (c - b*y);
}

C++: #include <iostream>
#include <cstdio>

// x = (e * c - b * f) / (a * e - b * d)
// y = (a * f - d * c) / (a * e - b * d)

using namespace std;

int main() {
    double a, b, c, d, e, f;

    while (cin >> a >> b >> c >> d >> e >> f) {
        int det = a * e - b * d;
        double x = (e * c - b * f) / det + 0.0;
        double y = (a * f - d * c) / det + 0.0;
        printf("%.3f %.3f", x, y);
    }

    return 0;
}

C++: #include <iomanip>
#include <iostream>
 
using namespace std;
 
int main()
{ 
	double a, b, c, d, e, f;

	while (cin >> a >> b >> c >> d >> e >> f)
	{
		// matrix
		double y = (d * c - a * f) / (d * b - a * e);
		double x = (c - b * y) / a;
		cout << setprecision(3) << fixed << x << " " << y << endl;
	}

	return 0;
}

C++: #include <bits/stdc++.h>

using namespace std;

int main() {
	double a, b, c, d, e, f;
	while (cin >> a >> b >> c >> d >> e >> f) {
		double x = (c * e - b * f) / (a * e - b * d);
		double y = (c * d - a * f) / (b * d - a * e);
		if (-0.0005 <= x && x < 0.0005) x = 0;
		if (-0.0005 <= y && y < 0.0005) y = 0;
		cout << fixed << setprecision(3) << x << " " << y << endl;
	}
}

C++: #include <iostream>
#include<cstdio>
using namespace std;

int main() {
	// your code goes here

  double a,b,c,d,e,f;

  while(cin >> a >> b >> c >> d >> e >> f ){

    double x = (c*e-b*f)/(a*e-b*d);
    double y = (c*d-a*f)/(b*d-a*e);

    printf("%.3f %3f\n",x,y);

  }
	return 0;
}

C++: #include <iostream>
#include <iomanip>
using namespace std;

int main() {
	double a, b, c, d, e, f, x, y;
	while (cin >> a >> b >> c >> d >> e >> f, !cin.eof()) {
		x = (c - f*b / e) / (a - d*b / e);
		y = (c - a*x) / b;
			cout << fixed << setprecision(3) << x << " " << y << endl;
	}
}

C++: #include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>

using namespace std;

int main(){
    int a,b,c,d,e,f;
    double x,y;
    while(scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f)!=EOF){
        x = (double)((c*e)-(f*b)) / (double)((a*e)-(b*d));
        y = (double)((c*d)-(a*f)) / (double)((b*d)-(a*e));
        printf("%.3lf %.3lf\n",x,y);
    }
    return 0;
}