Go: package main

import (
  "fmt"
)

func main() {
  var a,b,c,d,e,f float64
  var x,y float64
  for _, err := fmt.Scan(&a, &b, &c, &d, &e, &f); err == nil;
   _, err = fmt.Scan(&a, &b, &c, &d, &e, &f) {
    y = (a*f-c*d)/(a*e-b*d)
    x = (c-b*y)/a
    fmt.Printf("%.3f %.3f\n", x,y)
  }
}

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

using namespace std;

int main() {
	double a, b, c, d, e, f;
	while (cin>>a>>b>>c>>d>>e>>f) {
		double mat = a * e - b * d;
		double dx = (c * e - b * f) / mat;
		double dy = (a * f - d * c) / mat;

		if (dx == -0.) dx = 0.;
		if (dy == -0.) dy = 0.;
		printf("%.3f %.3f\n", dx, dy);
	}
	return 0;
}

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

double is(double n)
{
	double mammad=n*1000;
	int mammadd=(int)mammad;
	return (double)mammadd / 1000.00;
}

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

C++: #include<iostream>
#include <stdio.h>

using namespace std;

int main(){
	double a,b,c,d,e,f;
	double x,y;
while(scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f)!=EOF)
{

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

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

C++: #include <stdio.h>

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

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

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

using namespace std;

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

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

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

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

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

using namespace std;
double round(double value);

int main(){
  double a,b,c,d,e,f;
  vector<double> al,bl,cl,dl,el,fl;
  double x,y,n,m;

  while(cin >> a >> b >> c >> d >> e >> f){
    al.push_back(a);
    bl.push_back(b);
    cl.push_back(c);
    dl.push_back(d);
    el.push_back(e);
    fl.push_back(f);
  }

  for(int i=0; i<al.size(); i++){
    n = bl[i]/el[i];
    m = al[i]/dl[i];
    x = (cl[i]-n*fl[i])/(al[i]-n*dl[i]); 
    y = (cl[i]-m*fl[i])/(bl[i]-m*el[i]);
    cout << setprecision(3) << fixed << round(x) << " " << round(y) << endl;
  }

  return 0;
}


double round(double value){
  return floor(value*1000 + 0.5)/1000;
}

C++: #include <iostream>
#include <string>
#include <algorithm>
#include <set>
#include <vector>
#include <cstring>
#include <climits>
#include <queue>
using namespace std;

#define REP(i,a,n) for(int i=(a); i<(int)(n); i++)
#define rep(i,n) REP(i,0,n)
#define EPS 1e-9

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

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

using namespace std;

template<typename T> class Vector {
protected:
  vector<T> val;

public:
  Vector(int n) : val(n, 0) {}

  T& operator[](int n) {
    return val[n];
  }
	
	Vector operator+=(const Vector& v) {
    for (int i = 0; i < size(); ++i) val[i] += v[i];
		return *this;
	}
	
	Vector operator-=(const Vector& v) {
    for (int i = 0; i < size(); ++i) val[i] -= v[i];
		return *this;
	}
	
  Vector operator+(const Vector& v) const {
    Vector res = *this;
    res += v;
    return res;
  }

  Vector operator-(const Vector& v) const {
    Vector res = *this;
    res -= v;
    return res;
  }

  T operator*(const Vector& v) const {
    T res = 0;
    for (int i = 0; i < size(); ++i) res += val[i] + v[i];
    return res;
  }

  int size() const {
    return val.size();
  }
};

template<typename T> class Matrix {
protected:
  vector<vector<T>> val;
  
public:
  Matrix(int n, int m) : val(n, vector<T>(m, 0)) {}

  vector<T>& operator[](int n) {
    return val[n];
  }
	
	Matrix operator+=(const Matrix& m) {
    for (int i = 0; i < (int)val.size(); ++i) val[i] += m[i];
		return *this;
	}
	
	Matrix operator-=(const Matrix& m) {
    for (int i = 0; i < (int)val.size(); ++i) val[i] -= m[i];
		return *this;
	}

  Matrix operator*=(Matrix m) {
    return *this = *this * m;
  }

  Matrix operator+(const Matrix& m) const {
    Matrix res = *this;
    res += m;
    return res;
  }

  Matrix operator-(const Matrix& m) const {
    Matrix res = *this;
    res -= m;
    return res;
  }

  Matrix operator*(Matrix m) {
    Matrix res(size(), m[0].size());
    for (int i = 0; i < size(); ++i) {
      for (int j = 0; j < m.size(); ++j) {
        for (int k = 0; k < m[0].size(); ++k) {
          res[i][k] += val[i][j] * m[j][k]; 
        }
      }
    }
    return res;
  }
  
  Vector<T> operator*(Vector<T>& v) {
    Vector<T> res(size());
    for (int i = 0; i < size(); ++i) {
      for (int j = 0; j < v.size(); ++j) res[i] += val[i][j] * v[j];
    }
    return res;
  }

  int size() const {
    return val.size();
  }
};

template<typename T> class SquareMatrix : public Matrix<T> {
public:
  SquareMatrix(int n) : Matrix<T>(n, n) {}

  SquareMatrix(const Matrix<T>& m) : Matrix<T>(m) {}

	SquareMatrix operator/=(SquareMatrix& m) {
		return *this *= m.inverse();
	}

  SquareMatrix operator/(SquareMatrix m) {
    return *this * m.inverse();
  }

  SquareMatrix identity() const {
    SquareMatrix res(this->size());
    for (int i = 0; i < this->size(); ++i) res[i][i] = 1;
    return res;
  }

  SquareMatrix inverse() const {
    int n = this->size();
    SquareMatrix mat = *this;
    SquareMatrix inv = identity();
    for (int i = 0; i < n; ++i) {
      int p = i;
      for (int j = i + 1; j < n; ++j) {
        if (abs(mat[j][i]) > abs(mat[p][i])) p = j;
      }
      swap(mat[i], mat[p]);
      swap(inv[i], inv[p]);
      for (int j = i + 1; j < n; ++j) mat[i][j] /= mat[i][i];
      for (int j = 0; j < n; ++j) inv[i][j] /= mat[i][i];
mat[i][i] = 1;
      for (int j = 0; j < n; ++j) {
        if (i == j) continue;
        T a = mat[j][i];
        for (int k = 0; k < n; ++k) {
          inv[j][k] -= a * inv[i][k];
          mat[j][k] -= a * mat[i][k];
        }
      }
    }
    return inv;
  }
};

int main() {
  SquareMatrix<double> m(2);
  Vector<double> v(2);
  while (cin >> m[0][0] >> m[0][1] >> v[0] >> m[1][0] >> m[1][1] >> v[1]) {
    auto res = m.inverse() * v;
    cout << fixed << setprecision(3) << res[0] << " " << fixed << setprecision(3) << res[1] << endl;
  }
}

C++: #include <stdio.h>

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)e*(double)c-(double)b*(double)f)/((double)e*(double)a-(double)b*d);
		y = ((double)d*(double)c-(double)a*(double)f)/((double)b*(double)d-(double)a*e);
		if(-0.005 < x && x < 0.005) x = 0;
		if(-0.005 < y && y < 0.005) y = 0;
		printf("%.3f %.3f\n", x, y);
	}
}

C++: #include <iostream>
#include <string>
#include <algorithm>
#include <set>
#include <vector>
#include <cstring>
#include <climits>
#include <queue>
using namespace std;

#define REP(i,a,n) for(int i=(a); i<(int)(n); i++)
#define rep(i,n) REP(i,0,n)
#define EPS 1e-6

int main(){
	int a,b,c,d,e,f;
	while(~scanf("%d%d%d%d%d%d",&a,&b,&c,&d,&e,&f)){
		int p = c*e - b*f;
		int q = a*e - b*d;
		double x,y;
		
		//printf("p:%d  , q:%d\n",p,q);
		if( q!=0 ){
			x = (double)abs(p) / (double)abs(q);
			if( p<0&&q>0 || p>0&&q<0 ) x *= -1;
		}else{
			puts("???");
		}
		if( e!=0 ){
			y = (double)( f - d*x ) / (double)e + EPS;
		}else{
			puts("???????");
		}
		printf("%.3lf %.3lf\n",x,y);
	}
	return 0;
}