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)
		if data[0] == 0 || data[1] == 0 || data[2] == 0 || data[3] == 0 || data[4] == 0 || data[5] == 0 {
			break
		}
		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<cstdio>
#include<string>
using namespace std;

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

	while(1){
		getline( cin, str );
		if( str.size()==0 ){
			break;
		}
		sscanf( str.c_str(), "%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f );

		double D  = a*e-b*d;
		double D1 = c*e-f*b;
		double D2 = a*f-d*c;
		x = D1 / D;
		y = D2 / D;

		bool isX = ( (c-a*x)/b == (f-d*x)/e );
		bool isY = ( (c-b*y)/a == (f-e*y)/d );
		if( !isX && isY ){
			x = 0.0;
			y = c/b;
		}else if( isX && !isY ){
			y = 0.0;
			x = c/a;
		}else if( !isX && !isY ){
			x = y = 0.0;
		}

		if( x == -0.000 )	x = 0.000;
		if( y == -0.000 )	y = 0.000;

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

	return 0;
}

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

int main(){
  double a1,b1,c1,d1,e1,f1,a2,b2,c2,d2,e2,f2,a3,b3,c3,d3,e3,f3,x,y;

  for(;;){
    cin>>a1>>b1>>c1>>d1>>e1>>f1;

    a2=a1*d1;
    b2=b1*d1;
    c2=c1*d1;

    d2=a1*d1;
    e2=a1*e1;
    f2=a1*f1;

    y=(c2-f2)/(b2-e2);

    a3=a1*e1;
    b3=b1*e1;
    c3=c1*e1;

    d3=b1*d1;
    e3=b1*e1;
    f3=b1*f1;

    x=(c3-f3)/(a3-d3);

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

}

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

int main(){
	int a,b,c,d,e,f;
	while(cin>>a>>b>>c>>d>>e>>f){
		int d1[3]={a,b,c};
		int d2[3]={d,e,f};
		double anx=(c*e-f*b)/(a*e-d*b);
		double any=(c*d-f*a)/(b*d-e*a);
		printf("%.3f ",anx);
		printf("%.3f\n",any);
	}
	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 y=(a*f-d*c)/(a*e-d*b);
		double x=(c-b*y)/a;
		
		cout<<fixed<<setprecision(3)<<x<<" "<<y<<endl;
	}
	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){
        double y = (a*f-c*d)/(a*e-b*d);
        double x = (c-(b*y))/a;
        if(x==0) x=0.000;
        if(y==0) y=0.000;
        printf("%.3lf %.3lf\n",x,y);
    }
    return 0;
}

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

C++: //
//  main.cpp
//  Sample
//
//  Created by h3037183 on 2017/07/31.
//  Copyright ?? 2017??´ ?°????. All rights reserved.
//

#include <iostream>
#include<algorithm>
using namespace std;
int main(){
    double a,b,c,d,e,f,x,y;
    for(;;){
    cin>>a>>b>>c>>d>>e>>f;
    x=(c*e-b*f)/(a*e-b*d);
    y=(c*d-a*f)/(b*d-a*e);
    cout<<x<<" "<<y<<endl;
    }
    return 0;
}

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

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

C++: 
#include <iostream>
#include <iomanip>
#include <algorithm>
#include <string>
#include <vector>
#include <set>
#include <map>
#define pi 3.14159265358979323846264338
using namespace std;

int main() {
	int a, b, c, d, e, f;
	double by, ey, x, y, cc, ff;
	while (cin >> a >> b >> c >> d >> e >> f) {
		by = b*d;
		cc = c*d;
		ey = e*a;
		ff = f*a;
		y = (ff - cc) / (ey - by);
		x = (c - b*y) / a;
		int xx = x * 10000, yy = y * 10000;
		if (xx % 10 >= 5) {
			x += 0.001;
		}
		if (yy % 10 >= 5) {
			y += 0.001;
		}
		cout << fixed << setprecision(3) << x << " " << y << endl;
	}
	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 delta = a*e - d*b;
    double x = (1/delta)*(e*c+(-b)*f);
    double y = (1/delta)*((-d)*c+a*f);
    //cout << x << " " <<y << endl;
    printf("%4.3f %4.3f\n",x,y);
  }
}

C++: #include <algorithm>
#include <string.h>
#include <stdio.h>

int main()
{
	const double EPS = 1.0e-10;
	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 - b * f) / (a * e - b * d);
		y = (a * f - d * c) / (a * e - b * d);
		if(-0.0005 < x && x < 0.0+EPS) x = 0.0;
        if(-0.0005 < y && y < 0.0+EPS) y = 0.0;
		printf("%.3f %.3f\n",x,y);
	}
	return 0;
}

C++: #include <stdio.h>

int main(void) {
  double a, b, c, d, e, f;
  while(scanf("%lf%lf%lf%lf%lf%lf", &a, &b, &c, &d, &e, &f) != EOF) {
    double ee = e / b, dd = d / a;
    double ax = a * ee, cx = c * ee;
    printf("%.3f ", (cx - f) / (ax - d) == -0 ? 0 : (cx - f) / (ax - d));
    b *= dd, c *= dd;
    printf("%.3f\n", (c - f) / (b - e) == -0 ? 0 : (c - f) / (b - e));
  }
  return 0;
}

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

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

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

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

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


      return 0;
    }

C++: #include<bits/stdc++.h>
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*d-a*f)/(b*d-a*e);

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

}

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

#define MAX 1000

int main(void){

	float a, b, c, d, e, f;
	float ansx[MAX], ansy[MAX];

	int i = 0;

	while (scanf("%f%f%f%f%f%f%f", &a,&b,&c,&d,&e,&f) != EOF){
		if (a*e != b*d){
			ansx[i] = (c*e - b*f) / (a*e - b*d);
			ansy[i] = (c*d - a*f) / (b*d - a*e);
			if ((int)(ansx[i] * 10000) % 10 > 4){
				ansx[i] += 0.001;
			}
			if ((int)(ansy[i] * 10000) % 10 > 4){
				ansy[i] += 0.001;
			}
		}
		i++;
	}

	for (int j = 0; j < i; j++){
		printf("%.3f %.3f\n", ansx[j], ansy[j]);
	}
	
	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){
        if(cin.eof()) break;
        x = (c*e-b*f)/(a*e-b*d);
        y = (f*a-c*d)/(a*e-d*b);
        // x += 0.0005;
        // y += 0.0005;
        printf("%.3f %.3f\n",x,y);
    }
}

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

double round_at(double n,int dig){
    return ((int)(round(n*pow(10,dig))))/pow(10,dig);
}

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){
        x = (c*e-b*f)/(a*e-b*d);
        y = (a*f-c*d)/(a*e-b*d);
        x = round_at(x,3);
        y = round_at(y,3);
        printf("%.3lf %.3lf\n",x,y);
    }
}