Go: package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
	"strconv"
)

var sc = bufio.NewScanner(os.Stdin)

func main() {
	sc.Split(bufio.ScanWords)
	for {
		data := nextInts(6)
		fmt.Printf("%.3f\n", Round(GetX(data[0], data[1], data[2], data[3], data[4], data[5]), 3))
		fmt.Printf("%.3f\n", Round(GetY(data[0], data[1], data[2], data[3], data[4], data[5]), 3))
	}
}

func GetX(a, b, c, d, e, f float64) float64 {
	return ((c * e) - (b * f)) / ((a * e) - (b * d))
}

func GetY(a, b, c, d, e, f float64) float64 {
	return ((c * d) - (a * f)) / ((b * d) - (a * e))
}

func Round(f float64, places int) float64 {
	shift := math.Pow(10, float64(places))
	return math.Floor(f*shift+.5) / shift
}

func next() string {
	sc.Scan()
	return sc.Text()
}

func nextInt() float64 {
	a, _ := strconv.Atoi(next())
	return float64(a)
}

func nextInts(n int) []float64 {
	a := make([]float64, n)
	for i := 0; i < n; i++ {
		a[i] = nextInt()
	}
	return a
}

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

using namespace std;

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

	vector<string> v;
	while (cin >> a >> b >> c >> d >> e >> f) {
		double x, y;

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

		x = x * 1000;
		x = round(x);
		x = x / 1000;

		y = y * 1000;
		y = round(y);
		y = y / 1000;

		stringstream ss;
		ss << fixed << setprecision(3) << x << " " << y;
		v.push_back(ss.str());
	}
	
	for (int i = 0; i < v.size(); i++) {
		cout << v[i] << endl;
	}

	return 0;
}

C++: #include<stdio.h>
int main(){
	double a,b,c,d,e,f,x,y;
	while(scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f)!=-1){
		x=((c*e-f*b)/(a*e-d*b));
		y=((c-a*x)/b);
		if(x>0)x+=0.0005;
		else x-=0.0005;
		if(y>0)x+=0.0005;
		else y=-0.0005;
		printf("%.3ld %.3ld",x,y);
	}
	return 0;
}

C++: #include <iostream>
#include <stdio.h>
using namespace std;
 
int main() {
	double a,b,c,d,e,f;
	while (cin >> a >> b >> c >> d >> e >> f) {
		// ???????????????(???????????????????????????????????????)
		// ?¬¬?????????x????????°???1?????????
		b /= a;
		c /= a;
		a = 1;
		// ????????¶?????§???????¨???? (e-bd)y = f-cd ?????????????????????
		double y = (f - c*d) / (e - b*d);
		double x = c - b * y;
		printf ("%1.3f %1.3f",x,y);
		cout << endl;
	}
	return 0;
}

C++: #include <cstdio>
using namespace std;
int main()
{
	int a, b, c, d, e, f;
	while (scanf("%d%d%d%d%d%d", &a,&b,&c,&d,&e,&f) != EOF) {
		double x, y;
		int p = b*d - a*e;
		x = (double)(b*f - c*e) / p;
		y = (double)(c*d - a*f) / p;
		printf("%.3f %.3f\n", x, y);
	}
	return 0;
}

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

int main(){
	int a,b,c,d,e,f;
	
	cout<<"ax+by=c"<<endl<<"dx+ef=f"<<endl;
	cout<<"		????§£???x,y??????????????????"<<endl;
	
	cout<<"a b c d e f >>>>";
	cin>>a>>b>>c>>d>>e>>f;
	
	cout<<"x="<<(e*c-b*f)/(a*e-b*d)
		<<"y="<<(-c*d+a*f)/(a*e-b*d)<<endl;
	return 0;
}

C++: (function set_utils(undefined){
	this.print_float = function print_float(val, base, pad, prec) {
		var p10=Math.pow(10,prec);
		var ival=""+Math.round(val*p10);
		if ( ival === '0' )
			return '0.'+Array(prec+1).join('0');
		var ilen=ival.length-prec;
		if(ilen===0)
			return "0."+ival.substr(ilen,prec);
		return ival.substr(0,ilen)+"."+ival.substr(ilen,prec);
	};
}).call(global);

(function(undefined){
	'use strict';

	(function init() {
		this.output = function() {
			console.log.apply( console, arguments );
		};
		this.stdin = process.openStdin();
		stdin.setEncoding('utf8');
		this.input_list = [];
		stdin.on('data', function(chunk){
			var result = chunk.match(/[-]?\d+/g);
			input_list = input_list.concat(result);
		});
		stdin.on('end', function(){
			fire();
		});
		this.input_number = function() {
			return parseInt( input_list.splice(0,1)[0] );
		};
		this.has_next = function() {
			return ! input_list.length;
		};
	}).call( this );

	(function solver(){
		function sq(x) {
			return x * x;
		}
		function check(v) {
		}
		this.fire = function() {
			setTimeout( function solve() {
				var a = input_number();
				var b = input_number();
				var c = input_number();
				var d = input_number();
				var e = input_number();
				var f = input_number();
				var delta = 1.0 / ( a*e - b*d );
				var x = ( e * c - b * f ) * delta;
				var y = ( a * f - d * c ) * delta;
				output( print_float(x,10,3,3) + ' ' + print_float(y,10,3,3)  );
				if ( ! has_next() )
					setTimeout( solve, 0, this );
			}, 0, this );
		};
	}).call(this);

}).call(global);

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

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

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

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

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

int main(){
	double a,b,c,d,e,f,x,y;
	while(true){
		cin>>a>>b>>c>>d>>e>>f;
		if(cin.eof()) break;
		x=(b*f-c*e)/(b*d-a*e);
		y=(c-a*x)/b;
		x=round(x*1000.0)/1000.0;
		y=round(y*1000.0)/1000.0;
		if(x-0.0<0.001&&x-0.0>-0.001) x=0.0;
		if(y-0.0<0.001&&y-0.0>-0.001) y=0.0;
		cout<<x<<" "<<y<<endl;//debug
		printf("%.3f %.3f\n",x,y);
	}
	return 0;
}

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

const double eps = 1e-10;
typedef vector<vector<double>> mat;

vector<double> gauss_jordan(const mat& A, const vector<double> b) {
	int n = A.size();
	mat B(n, vector<double>(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; 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 vector<double>();
		
		for(int j = i + 1; j <= n; ++j)
			B[i][j] /= B[i][i];
		for(int j = 0; j < n; ++j){
			if(i != j){
				for(int k = i + 1; k <= n; ++k)
					B[j][k] -= B[j][i] * B[i][k];
			}
		}
	}
	vector<double> x(n);
	
	for(int i = 0; i < n; ++i)
		x[i] = B[i][n];
	return x;
}

int main() {
	double a, b, c, d, e, f;
	while(cin >> a >> b >> c >> d >> e >> f){
		mat m;
		vector<double> l1, l2, r;
		l1.push_back(a); l1.push_back(b); r.push_back(c);
		l2.push_back(d); l2.push_back(e); r.push_back(f);
		m.push_back(l1); m.push_back(l2);
		vector<double> ans = gauss_jordan(m, r);
		printf("%.3f %.3f\n", ans[0], ans[1]);
	}
	return 0;
}

C++: #include<cstdio>
#include<cstdlib>
#include<cmath>
#include<climits>
#include<iostream>
#include<algorithm>
#include<stack>
#include<queue>
#include<vector>
#include<list>
#include<map>
#include<set>
typedef long long ll;
typedef unsigned long long ull;
using namespace std;
#define pb push_back
int dy[]={0, 0, 1, -1, 0};
int dx[]={1, -1, 0, 0, 0};
 
#define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--)
#define REP(i,n) for (int i=0;i<(n);i++)
#define RREP(i,n) for (int i=(n)-1;i>=0;i--)

int main(){
    while(1){
        double a,b,c,d,e,f;
        int ret = scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f);
        if(ret == EOF)
            break;

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

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

C++: #include <iostream>
using namespace std;
int main() {
    double a, b, c, d, e, f, x, y;
    cout.precision(3);
    cout << fixed;
    while (cin >> a >> b >> c >> d >> e >> f) {
        x = (c * e - b * f) / (a * e - b * d);
        y = (a * f - c * d) / (a * e - b * d);
        if (x == 0) x = 0;
        if (y == 0) y = 0;
        cout << x << " " << y << endl;
    }
    return 0;
}