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>
using namespace std;

int main(){
  double a,b,c,d,e,f;
  while(cin>>a>>b>>c>>d>>e>>f){
    double matrix = 1/(a*e-b*d);
    double x = matrix*(e*c-b*f);
    double y = matrix*(a*f-d*c);
    if(x==-0.0) x=0.0;
    if(y==-0.0) y=0.0;
    printf("%4.3f %4.3f\n",x,y);
  }
}

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

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

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

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

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

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

using namespace std;

int main(){
    int a, b, c, d, e, f;
    /***
    |a, b| |x| - |c|
    |d, e| |y| - |f|
     ***/
    while (cin >> a >> b >> c >> d >> e >> f) {
	int p, q, r, s;
	double det = (a*e - b*d);
	p = e;
	q = -b;
	r = -d;
	s = a;

	double x, y;
	x = (p*c + q*f) / det;
	y = (r*c + s*f) / det;
	if (x == 0) {x = 0;}
	if (y == 0) {y = 0;}
	
	printf("%.3lf %.3lf\n", x, y);
    }

    return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
int a, b, c, d, e, f;
int main() {
	while(cin >> a >> b >> e >> c >> d >> f) {
		double p = d * e - b * f; p /= a * d - b * c; if(-1e-10 < p && p < 1e-10) p = 0.0;
		double q = a * f - c * e; q /= a * d - b * c; if(-1e-10 < q && q < 1e-10) q = 0.0;
		printf("%.3lf %.3lf\n", p, q);
	}
	return 0;
}

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

int main(){
	float a,b,c,d,e,f,x,y;
	while(scanf("%f",&a)){
	scanf("%f%f%f%f%f",&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);
	std::cout<<std::endl;
	}
	return 0;
	}

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

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);

	if(x==0)x=0;
	if(y==0)y=0;

	cout << fixed << setprecision(3) << x << " " << y << endl;
}
}

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

struct vector2{
	float x, y;
	vector2() : x(0), y(0){}
	vector2(float x, float y) : x(x), y(y){}
};

struct sim_elem{
	float a, b, c, d, e, f;
	sim_elem() :a(0), b(0), c(0), d(0), e(0), f(0){}
	sim_elem(float a, float b, float c, float d, float e, float f) :a(0), b(0), c(0), d(0), e(0), f(0){}
};

//	a / d * d
//	ey - by = f - c
//	y / y = (f - c) / y

// ax = -by + c
// ax / a = -(by + c) / a

vector2 sim_equ(sim_elem elem){

	float dx = elem.a / elem.d * elem.d;
	float ey = elem.a / elem.d * elem.e;
	float f = elem.a / elem.d * elem.f;
	if (elem.d == 0){ dx = 0, ey = 0, f = 0; }

	float y = ey - elem.b;
	float yr = f - elem.c;
	if (y != 0)y = yr / y;

	float ax = -elem.b * y + elem.c;
	float x = ax / elem.a;
	if (elem.a == 0)x = 0;

	return vector2(x, y);
}

//	sprintf
float placement4(float val){
	char ret[128];
	sprintf(ret, "%.3f", val);
	return (float)atof(ret);
}

int main(){

	sim_elem elem;
	while (1){
		cin >> elem.a >> elem.b >> elem.c >> elem.d >> elem.e >> elem.f;
		if (cin.eof())break;
		vector2 ret;
		ret = sim_equ(elem);
		printf("%.3f %.3f\n", placement4(ret.x) ,placement4(ret.y) );
	}

	return 0;
}

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

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

}

C++: #include <stdio.h>

int main(void)
{
	int a, b, c, d, e, f;
	double x, y;
	
	while(scanf("%d %d %d %d %d %d", &a, &b, &c, &d, &e, &f) != EOF){
		if(e*a > b*d){		
			x = (e*c - b*f) / (e*a - b*d);
			y = (d*c - a*f) / (e*a - b*d) * (-1);
		}
		else{
			x = (e*c - b*f) / (b*d - e*a) * (-1);
			y = (d*c - a*f) / (b*d - e*a);
		}
		x += 0.0005;
		y += 0.0005;

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

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


double a,b,c,d,e,f;
double A,B;//x,y座標
int main(){
  while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f) !=EOF){
    B =(c*e-f*b)/(a*e-b*d);
    A = (c -b*B)/a;
    A =floor((A+0.0005)*1000)/1000;//小数第4位を四捨五入
    B =floor((B+0.0005)*1000)/1000;
    if(A ==0)
      A =0;
    if(B ==0)
      B =0;
    printf("%.3f %.3f\n",B,A);
  }
  return 0;
}

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

C++: #include <iostream>
#include<string>
#include<cmath>
#include<algorithm>
#include<cctype>
#include<queue>
#include<stack>
#include<stdio.h>
#include<vector>
#include<set>
#include<map>
#include<iomanip>
#define rep(i,n) for(int i=0;i<n;i++)
typedef int long long ll;

using namespace std;
int main(){

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

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

int main(){

    double a,b,c,d,e,f,y,x,bb,cc,dd,ee,ff;
    while(cin>>a>>b>>c>>d>>e>>f){
        bb=b/a;
        cc=c/a;
        ee=e/d;
        ff=f/d;
        y=(cc-ff)/(bb-ee);
        x=(c-b*y)/a;
        //y=123.45678;
        y=round(1000*y);
        y=(int)y;
        y=y/1000;
        
        x=round(1000*x);
        x=(int)x;
        x=x/1000;
        cout<<fixed<<setprecision( 3 )<<x<<" "<<y<<endl;
        //printf("%f %f\n",x,y);
    }
    return 0;
}