Go: package main

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

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	for scanner.Scan() {
		strNums := strings.Fields(scanner.Text())
		nums := []int{}
		for _, strNum := range strNums {
			num, _ := strconv.Atoi(strNum)
			nums = append(nums, num)
		}
		a := nums[0]
		b := nums[1]
		c := nums[2]
		d := nums[3]
		e := nums[4]
		f := nums[5]
		var mulA, mulD int
		if a < 0 {
			mulA = a * -1
		} else {
			mulA = a
		}
		if d < 0 {
			mulD = d * -1
		} else {
			mulD = d
		}
		a *= mulD
		b *= mulD
		c *= mulD
		d *= mulA
		e *= mulA
		f *= mulA

		if d < 0 {
			d *= -1
			e *= -1
			f *= -1
		}

		bE := b - e
		cF := c - f
		if bE == 0 {
			bE = 1
		}
		y := cF / bE
		x := (c - (y * b)) / a

		fmt.Print(x)
		fmt.Println(".000")
		fmt.Print(y)
		fmt.Println(".000")
	}
}

C++: #include<stdio.h>
#include<math.h>
double sg(double x){
	if ( x > 0.0 ) {
		return floor(x + 0.0005);
	}else if(x==0.0){
		return x;
	} else {
    	return (-0.001 * floor(fabs(x) + 0.0005));
	}
}
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)!=EOF){
		y=sg(((c*d)-(a*f))/((b*d)-(a*e)));
		x=sg(((c*e)-(b*f))/((a*e)-(b*d)));
		printf("%3lf %3lf\n",x,y);
	}
	return 0;
}

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

#define     MAX_LENGTH     255

using namespace std;

double num_abs_round(const double,const int);

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

	while (cin >> a >> b >> c >> d >> e >> f){
		// Det(係数行列) を計算
		det = (a * e) - (b * d);
		// Det(係数行列) ≠ 0 かどうかをチェック
		if(det == 0){
			cerr << "エラー：この連立方程式の解は存在しないか一意に定まらない" << endl;
			return -1;
		}

		// 解を求める
		x = ((e * c) - (b * f)) / det;
		y = ((a * f) - (d * c)) / det;

		// 整形
		x = num_abs_round(x,3);
		y = num_abs_round(y,3);

		// 表示する
		printf("%.3f %.3f\n",x,y);
	}

	return 0;
}

double num_abs_round(const double num,const int p){
	char num_str[MAX_LENGTH];
	char rtn_str[MAX_LENGTH];
	int i,j;
	bool flag = false;
	double rtn;

	// rtn_str の初期化
	for(i=0;i < ((int)(MAX_LENGTH));i++){
		rtn_str[i] = '\0';
	}

	// 数値を文字列に変換
	sprintf(num_str,"%f\0",num);

	// 符号の確認
	if(num_str[0] == '-'){
		j = 1;
		rtn_str[0] = '0';
	}else{
		j = 0;
	}

	// 小数点の検索 (num_str[j] に '.' が入っている)
	for(;num_str[j] != '.';j++){
		// 小数点がなければ num をそのまま返す
		if(num_str[j] == '\0'){
			return num;
		}
		// rtn_str に num_str をコピー
		rtn_str[j] = num_str[j];
	}

	// '.'をコピー
	rtn_str[j] = '.';

	// 小数点以下 (p + 1) 桁までをコピー
	for(i=1;i <= (p + 1);i++){
		// num が (p + 1) 桁未満だったら num をそのまま返す
		if(num_str[(j + i)] == '\0'){
			return num;
		}
		// rtn_str に num_str をコピー
		rtn_str[(j + i)] = num_str[(j + i)];
	}

	// 小数点以下 (p + 1) 桁を四捨五入
	if(((rtn_str[(j + p + 1)] - '0') >= 0) && ((rtn_str[(j + p + 1)] - '0') <= 4)){
		rtn_str[(j + p + 1)] = '\0';
	}else if((((int)(rtn_str[(j + p + 1)] - '0')) >= 5) && (((int)(rtn_str[(j + p + 1)] - '0')) <= 9)){
		flag = true;
		rtn_str[(j + p + 1)] = '\0';
	}else{
		return 0;
	}

	// rtn_str を数値に変換
	rtn = atof(rtn_str);

	// 五入の場合の処理
	if(flag == true){
		rtn += pow((double)10,(double)(p * (-1)));
	}

	return rtn;
}

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

C++: #include<iostream>
#include<algorithm>
#include<string>
#include<math.h>
using namespace std;

int main(){
	double a, b, c, d, e, f;
	double x, y;
	double A, B, C;
	const double p = 0.00000001;

	while (cin >> a >> b >> c >> d >> e >> f){
		A = (a*e) - (b*d);
		B = (c*e) - (b*f);
		C = (a*f) - (c*d);

		x = B / A;
		y = C / A;
		
		if (abs(x) < p) x = 0;
		if (abs(y) < p) y = 0;

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

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

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

int main(void)
{
	// ax+by=c,dx+ey=f => ax+by=c,-(a/d)*dx+-(a/d)*ey=-(a/d)*f => ax+by=c,-ax-aey/d=-af/d => by-aey/d=c-af/d => (b-ae/d)y = c-af/d => y=(c-af/d)/(b-ae/d)
	// ax+by=c, ax=c-by, x=(c-by)/a
	
	signed int a, b, c, d, e, f;
	double x, y;
	
	do
	{
		if(std::cin >> a, !std::cin) break;
		std::cin >> b >> c >> d >> e >> f;
		y = (c-a*f/(double)d)/(b-a*e/(double)d);
		x = (c-b*y)/(double)a;
		printf("%.3lf %.3lf\n", x, y);
	} while(true);

	return 0;
}

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

using namespace std;

int main(void)
{
	double a, b, c, d, e, f, x, y;
	
	while(cin >> a >> b >> c >> d >> e >> f){
		y = (c*d - a*f) / (b*d - a*e);
		x = (c - b*y) / a;
		
		if(x == -0)
		x = 0;
		if(y == -0)
		y = 0;
		
		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)
		cout << fixed << setprecision(3) << (c * e - b * f) / (a * e - b * d) + 0.00001 << ' ' << (c * d - a * f) / (b * d - a * e) + 0.00001 << endl;
}

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

using namespace std;
int a,b,c,d,e,f;
int main(){
	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 <cstdio>

using namespace std;

int main() {

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

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

	return 0;

}

C++: #include <bits/stdc++.h>
using namespace std;
using uint = unsigned int;
using lint = long long int;
using ulint = unsigned long long int;
template<class T = int> using V = vector<T>;
template<class T = int> using VV = V< V<T> >;
template<class T, class U> void assign(V<T>& v, int n, const U& a) { v.assign(n, a); }
template<class T, class... Args> void assign(V<T>& v, int n, const Args&... args) { v.resize(n); for (auto&& e : v) assign(e, args...); }


V<string> split(const string& s, char c) {
  V<string> res;
  stringstream ss(s);
  string t;
  while (getline(ss, t, c)) res.push_back(t);
  return res;
}

int main() {
  cin.tie(nullptr); ios_base::sync_with_stdio(false);
  string s;
  while (getline(cin, s)) {
    auto ss = split(s, ' ');
    double a = stod(ss[0]);
    double b = stod(ss[1]);
    double c = stod(ss[2]);
    double d = stod(ss[3]);
    double e = stod(ss[4]);
    double f = stod(ss[5]);
    double x = (c * e - f * b) / (a * e - d * b);
    double y = (c * d - f * a) / (b * d - e * a);
    cout << fixed << setprecision(3) << x << ' ' << y << '\n';
  }
}

C++: #include<stdio.h>
#define N 1000000
struct{double a,b,c,d,e,f;}data[N];

int main(){
    int i,L;
    double a,b,c,d,e,f;
    double x,y;
    for(i=0; i<N&&scanf("%d %d %d %d %d %d",data[i].a,data[i].b,data[i].c,data[i].d,data[i].e,data[i].f)!=EOF; i++);
    L=i;
    for(i=0;i<L;i++){
        a=data[i].a; b=data[i].b; c=data[i].c; d=data[i].d; e=data[i].e; f=data[i].f;
        x=(1/(a*e-b*d))*(e*c-b*f);
        y=(1/(a*e-b*d))*(a*f-d*c);
        printf("%.3f %.3f",x,y);
    }
    return 0;
}

C++: #include<stdio.h>

int main(void){
  double 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-b*f))/(a*e-b*d)*1000)/1000.0;
       y=((double)((d*c-a*f))/(b*d-a*e)*1000)/1000.0;
    if(x==-0.0)x=0.0;
    if(y==-0.0)y=0.0;
    printf("%.3lf %.3lf\n",x,y);
  }
  return 0;
}