Go: package main

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

var sc = bufio.NewScanner(os.Stdin)
var out = bufio.NewWriter(os.Stdout)

func main() {
	sc.Split(bufio.ScanWords)
	defer out.Flush()
	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 float64(((c * e) - (b * f)) / ((a * e) - (b * d)))
}

func GetY(a, b, c, d, e, f float64) float64 {
	return float64(((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 <cstdio>

using namespace std;

void solve(int a, int b, int c, int d, int e, int f) {
	double???y=(a*f-c*d)/(a*e-b*d);;
	double???x=(c-b*y)/a;;
	
	print("%.3f %.3f\n",x,y);;
}

int main() {
	int a, b, c, d, e, f;
	while (cin >> a >> b >> c >> d >> e >> f) {
		solve(a,b,c,d,e,f);
	}
	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<bits/stdc++.h>
using namespace std;

vector<vector<double> > A;
vector<double> B;

void gauss_jordan(){
    for(int i=0;i<A.size();i++){
        B[i] /= A[i][i];
        double aii = A[i][i];
        for(int j=i;j<A.size();j++)
            A[i][j] /= aii;
        for(int j=0;j<A.size();j++){
            if(j == i) continue;
            B[j] -= A[j][i] * B[i];
            double aji = A[j][i];
            for(int k=i;k<A.size();k++)
                A[j][k] -= aji * A[i][k];
        }
    }
}


int main(){
    double a[2][2] = {0}, b[2] = {0};
    while(scanf("%lf %lf %lf %lf %lf %lf", &a[0][0], &a[0][1], &b[0], &a[1][0], &a[1][1], &b[1]) != EOF){
        A.clear();
        B.clear();
        A.resize(2);
        for(int i=0;i<2;++i){
            for(int j=0;j<2;++j){
                A[i].push_back(a[i][j]);
            }
            B.push_back(b[i]);
        }
        gauss_jordan();
        printf("%.3f %.3f\n", B[0], B[1]);
    }

    return 0;
}

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 det = a*e - b*d;
    double y = (-d*c+a*f)/det;
    double x = (c-b*y)/a;

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

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

using namespace std;

int main() {

	double ans[4];
	int coe[12], i;

	for (i = 0; i < 12; i++) 
		cin >> coe[i];
	ans[0] = double(coe[2] * coe[4] - coe[1] * coe[5]) / double(coe[0] * coe[4] - coe[1] * coe[3]);
	ans[1] = double(coe[2] * coe[3] - coe[0] * coe[5]) / double(coe[1] * coe[3] - coe[0] * coe[4]);
	ans[2] = double(coe[8] * coe[10] - coe[7] * coe[11]) / double(coe[6] * coe[10] - coe[7] * coe[9]);
	ans[3] = double(coe[8] * coe[9] - coe[6] * coe[11]) / double(coe[7] * coe[9] - coe[6] * coe[10]);
	
	for (i = 0; i < 4; i++) {
		if (ans[i] == 0) {
			ans[i] = 0;
		}
	}

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

	return 0;

}

C++: #include <iostream>
#include <stdlib.h>
#include <string.h>
#include <sstream>
#include <iostream>
#include <math.h>
#include <iomanip>

using namespace std;

string float_to_string(float f, int digits)
{
  if (f == 0) {
    f = 0;
  }
  ostringstream oss;
  oss << setprecision(digits) << setiosflags(ios::fixed) << f;
  return oss.str();
}

void calc_and_output(int *c)
{
  float x = (float)(c[1]*c[5]-c[2]*c[4])/(c[1]*c[3]-c[0]*c[4]);
  float y = (float)(c[0]*c[5]-c[2]*c[3])/(c[0]*c[4]-c[1]*c[3]);

  cout << float_to_string(x, 3) << " " << float_to_string(y, 3) << endl;
}

int main(int argc, char const* argv[])
{
  int c[6];

  string line;
  while (getline(cin, line)) {
    istringstream iss(line);
    int val;
    int c[6];
    for (int i = 0; i < 6; i++) {
      iss >> val;
      c[i] = val;
    };

    calc_and_output(c);
  }

  return 0;
}

C++: #include<stdio.h>
int main()

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

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

int main(){
  int a,b,c,d,e,f;
  while(cin >> a >> b >> c >> d >> e >> f){
    double x,y;
    if(0 != a * e - d * b){
      x = 1.0 * (e * c - b * f)  / (a * e - b * d);
      y = 1.0 * (a * f - d * c)  / (a * e - b * d);
    }else{
      x = 0;
      y = 0;
    }
    double x_ = round(x * 1000);
    if(x_ < 1) { x_ = 0; }
    x_ = x_ /1000;
    double y_ = round(y * 1000);
    if(y_ < 1) { y_ = 0; }
    y_ = y_ /1000;
    cout << fixed << setprecision(3) << x_ << " ";
    cout << fixed << setprecision(3) << y_ << endl;
  }
}

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

#define times(n, i) uptil(0, n, i)
#define upto(f, t, i) for(auto _##i = (t), i = decltype(_##i)(f) poi i <= _##i poi i++)
#define uptil(f, t, i) for(auto _##i = (t), i = decltype(_##i)(f) poi i < _##i poi i++)
#define downto(f, t, i) for(auto i = (f), _##i = decltype(i)(t) poi i >= _##i poi i--)
#define downtil(f, t, i) for(auto i = (f), _##i = decltype(i)(t) poi i > _##i poi i--)

#define unless(c) if(!(c))
#define until(c) while(!(c))
#define loop while(true)

#define poi ;
#define poipoi << "\n"

using namespace std;

bool pyon(int a, int b, int c){
    return c && a * a + b * b == c * c poi
}

int main(){
    double a, b, c, d, e, f poi
    while(cin >> a >> b >> c >> d >> e >> f)
        printf("%.3f %.3f\n", (b * f - c * e) / (b * d - a * e), (a * f - c * d) / (a * e - b * d)) poi
    return 0 poi
}

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

int main()
{
	for (double a, b, c, d, e, f, x, y; cin >> a >> b >> c >> d >> e >> f; cout << fixed << setprecision(3) << x << ' '  << y << endl) {
		int tmp;
		x = ((c*e - b*f) ? (c*e - b*f) / (a*e - b*d) : 0.0000);
		if (x < 0) {
			x -= 0.0005;
		}
		else if (x>0) {
			x += 0.0005;
		}
		x = int(x * 1000) / 1000.0;
		y = ((a*f - c*d) ? (a*f - c*d) / (a*e - b*d) : 0.0000);
		if (y > 0) {
			y += 0.0005;
		}
		else if (y < 0) {
			y -= 0.0005;
		}
		y = int(y * 1000) / 1000.0;
	}
	return 0;
}

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

#define N 2

using namespace std;

int main(){
	double a[N][N+1];
	double d;
	int i, j, k;
	bool flag = 1;

	while(cin >> a[0][0] >> a[0][1] >> a[0][2] >> a[1][0] >> a[1][1] >> a[1][2]){
		for(k = 0; k < N - 1; k++){
			for(i = k+1; i < N; i++){
				d = a[i][k] / a[k][k];
				for(j = k + 1; j <= N; j++){
					a[i][j] = a[i][j] - a[k][j] * d;
				}
			}
		}
		for(i = N - 1; i >= 0; i--){
			d = a[i][N];
			for(j = i + 1; j < N; j++){
				d = d - a[i][j] * a[j][N];
			}
			a[i][N] = d / a[i][i];
		}
		printf("%.3f %.3f\n", a[0][N], a[1][N]);
	}
	return 0;
}

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

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

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

  return 0;
}