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 <iomanip>
#include <algorithm>
#include <functional>
#include <numeric>
#include <string>
#include <vector>
#include <list>
#include <iterator>

#include <cstdio>
#include <cmath>

#define DIM 2
#define EPS (5*10e-4)

typedef std::vector<double> Vec;
typedef std::vector<Vec> Mat;
typedef std::pair<Mat,Vec> Eq;

double removeMinusZero(double x){
	if ( fabs(x)< EPS ){
		return 0.0;
	}
	else {
		return x;
	}
}

int main(void){
	using namespace std;

	list<Eq> input;

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

	cout << fixed << setprecision(3);

	while(cin >> a >> b >> c >> d >> e >> f){
		Vec m1, m2;
		m1.push_back(a);
		m1.push_back(b);
		m2.push_back(d);
		m2.push_back(e);

		Vec vec;
		vec.push_back(c);
		vec.push_back(f);

		Mat mat;
		mat.push_back(m1);
		mat.push_back(m2);

		Eq eq = make_pair(mat,vec);

		input.push_back(eq);
	}

	for(auto itr = input.begin(); itr!=input.end(); ++itr){
		auto mat = itr->first;
		auto vec = itr->second;

		Vec output(DIM);

		auto det = mat[0][0] * mat[1][1] - mat[0][1] * mat[1][0];

		mat[0][1] = -mat[0][1];
		mat[1][0] = -mat[1][0];
		swap(mat[0][0],mat[1][1]);

		for (int i=0; i<DIM; i++){
			output[i] = inner_product(vec.begin(), vec.end(), mat[i].begin(), 0);
		}
		std::transform(output.begin(), output.end(),output.begin(), std::bind2nd(divides<double>(),det));
		cout << removeMinusZero(output[0]) << " " << removeMinusZero(output[1]) << endl;
	}

}

C++: #include <cstdio>
#define abs(x) (x>0?x:-x)

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

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

C++: #include<bits/stdc++.h>
using namespace std;

const double EPS=1e-8;
typedef vector<double>vec;
typedef vector<vec>mat;

/// Ax=b
vec gauss_jordan(const mat& A,const vec& b){
    int n=A.size();
    mat B(n,vec(n+1));

    for(int i=0;i<n;i++)
        for(int j=0;j<n;j++)B[i][j]=A[i][j];

    for(int i=0;i<n;i++)B[i][n]=b[i];

    for(int i=0;i<n;i++){
        int pivot=i;
        for(int j=i+1;j<n;j++){
            if(abs(B[j][i])<abs(B[pivot][i]))pivot=j;
        }
        swap(B[i],B[pivot]);
        if(abs(B[i][i])<EPS)return vec();

        for(int j=i+1;j<=n;j++)B[i][j]/=B[i][i];
        for(int j=0;j<n;j++){
            if(i==j)continue;
            for(int k=i+1;k<=n;k++)B[j][k]-=B[j][i]*B[i][k];
        }
    }

    vec x(n);
    for(int i=0;i<n;i++)x[i]=B[i][n];
    return x;
}

int main(){
    mat A(2,vec(2));
    vec b(2);
    while(true){
        for(int i=0;i<2;i++){
            if(scanf("%lf%lf%lf",&A[i][0],&A[i][1],&b[i])==EOF)return 0;
        }

        vec x=gauss_jordan(A,b);
        //if(x.size()<2)return 0;
        printf("%lf %lf\n",x[0],x[1]);
    }
    return 0;
}

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

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

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

/*
 * Wrong Answer
 * 2015-06-26 02:00
 */

int a, b, c, d, e, f;
double x, y;

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

	return 0;
}

C++: #include <iostream>
#include <string>
#include <vector>
#include <sstream>

using namespace std;
using DataSet = vector<double>;

void readInputData(vector<string> input_data){
    string buff;
    while(getline(cin, buff)){
        input_data.push_back(buff);
    }
}

void _parseString(const string& input_data, DataSet& data_set) {
    data_set.resize(6);

    stringstream ss;
    ss << input_data;
    ss >> data_set[0] >> data_set[1] >> data_set[2]
        >> data_set[3] >> data_set[4] >> data_set[5];
}

void parseString(const vector<string>& input_data, vector<DataSet>& data_set) {
    for(int i = 0; i < input_data.size(); ++i) {
        DataSet buff;
        _parseString(input_data[i], buff);
        data_set[i] = buff;
    }
}

double determinant2d(const DataSet& data){
    return data[0] * data[4] - data[1] * data[3];
}

void inverse2d(DataSet& data){
    double det = determinant2d(data);

    double t = data[0];
    data[0] = data[4];
    data[4] = t;

    data[1] = -data[1];
    data[3] = -data[3];

    data[0] /= det;
    data[1] /= det;
    data[3] /= det;
    data[4] /= det;
}


void calculateXY(const DataSet& data, vector<double>& result){
    result.resize(2);
    result[0] = data[0] * data[2] + data[1] * data[5];
    result[1] = data[3] * data[2] + data[4] * data[5];
}

void solve(vector<DataSet>& data_set){
    for(int i = 0; i < data_set.size(); ++i){
        vector<double> buff;

        inverse2d(data_set[i]);

        calculateXY(data_set[i], buff);

        cout << buff[0] << " " << buff[1] << endl;
    }
}


void doAllProcess(){
    vector<string> input_data;
    readInputData(input_data);

    vector<DataSet> data_set;
    parseString(input_data, data_set);
    
    solve(data_set);
}

int main(){
    doAllProcess();

    return 0;
}

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

using namespace std;

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

	while(cin >> a >> b >> c >> d >> e >> f){
		x = (e * c - b * f) / (a * e - b * d);
		y = (-d * c + a * f)/ (a * e - b * d);

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

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

double ans(double a,double b,double c,double d,double e,double f){
    double y1=b*d;
    double a1=c*d;
    double y2=e*a;
    double a2=f*a;
    double y=y1-y2;
    double a3=a1-a2;
    return a3/y;
}

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

    cout<<fixed<<setprecision(3)<<ans(b,a,c,e,d,f)<<' '<<setprecision(4)<<ans(a,b,c,d,e,f)<<endl;
}

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

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

C++: #include <cstdio>
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){
    y = (f - (d * c) / a) / ((d * -1 * b) / a + e);
    x = (c - b * y) / a;
    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;
	while (cin >> a >> b >> c >> d >> e >> f){
		/*
		a = 2;
		b = -1;
		c = -3;
		d = 1;
		e = -1;
		f = -3;
		*/
		double x, y;
		x = (c * e - b * f) / (a * e - b * d);
		y = (c * d - a * f) / (b * d - a * e);
		if (x == -0.000) x = 0.000;
		if (y == -0.000) y = 0.000;
		cout << fixed << setprecision(3) << x << " " << y << endl;
	}
	return 0;
}

C++: #include <stdio.h>

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

C++: 
#include<stdio.h>

int main (void){

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

    double X,Y;

    scanf("%d%d%d%d%d%d",&a,&b,&c,&d,&e,&f);

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

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

    printf("%.3lf %.3lf\n",X ,Y);


    return 0;
}