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<stdio.h>

void printFunc(int a,int b,int c,int d,int e,int f);

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

  while(scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f) != EOF){
    int pa = a,pb = b,pc = c,pd = d,pe = e,pf = f;   
    printFunc(a,b,c,d,e,f);
  }
  
  return 0;
}

void printFunc(int a,int b,int c,int d,int e,int f){
  float ansX,ansY;
  if(b == 0 || e == 0){
    ansY = 0;
  }
  else{
    ansY = (float)(c*d - f*a)/(float)(b*d - e*a);
  }

  if(a == 0 || d == 0){
    ansX = 0;
  }
  else{
    ansX = (float)(c*e - f*b)/(float)(a*e - d*b);
  }

  if(ansX < 0.0005f){
    ansX = 0.0f;
  }
  if(ansY < 0.0005f){
    ansY = 0.0f;
  }

  printf("%.3f %.3f\n",ansX,ansY);
}

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

using namespace std;

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

C++: #include<iostream>
#include<stdio.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 = (double)((e*c-b*f) / (a*e-b*d));
  y = (double)((-(d*c)+a*f) / (a*e-b*d));
  if(x == 0){x = 0;}
  if(y == 0){y = 0;}
  printf("%.3f %.3f\n",x,y);
 }
}

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

using namespace std;

/*
aX+bY=c
dX+eY=f
*/

void solve(int a, int b, int c, int d, int e, int f) {
	double x = (f - (double)e*c/b) / (d - (double)e*a/b);
	double y = ((double)c - a*x) / b;
	printf("%4.3f %4.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 <iostream>
#include <stdio.h>
int main()
{
    double a , b , c , d , e , f ;
    while ( std :: cin >> a >> b >> c >> d >> e >> f )
    {
        printf ("%.3lf %.3lf\n" , ( a*e*c - b*a*f ) / ( a*a*e - a*b*d ) , ( a*f - d*c ) / ( a*e - b*d ) ) ;
        //std :: cout << ( a*e*c - b*a*f ) / ( a*a*e - a*b*d ) << ' ' << ( a*f - d*c ) / ( a*e - b*d ) << std :: endl ;
    }
}

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 = (a*f-c*d)/(a*e-b*d);
    cout << "[1] [2]" << fixed << setprecision(3) << x << y << endl;
  }
}

C++: #include<stdio.h>
int main(void){
        float a,b,c,d,e,f,x,y;
        while(scanf("%f %f %f %f %f %f",&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=x*(-1);
                }
                if(y==0){
                        y=y*(-1);
                }
                printf("%.3f %.3f\n",x,y);
        }
        return 0;
}

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

using namespace std;

int main(void)
{
	double a,b,c;
	double d,e,f;
	double delta;
	double delta_one;
	double delta_two;
	double x,y;
	
	while( scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f) != EOF)
	{
		delta = (a*e) -(b*d);
		delta_one  = (c*e) - (f*b);
		delta_two = (a*f) - (c*d);
		x = delta_one/delta;
		y = delta_two/delta;
		x = x * 1000;
		y = y * 1000;
		x = (int)x;
		y = (int)y;
		x = x/1000;
		y = y/1000;

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

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

using namespace std;

int main(){
  int a,b,c,d,e,f;
  double x,y;
  while(cin>>a>>b>>c>>d>>e>>f){
    y = (a*f-d*c) / (a*e - b*d);
    x = (c-b*y) / a;
    cout << setprecision(3) << setiosflags(ios::fixed) << x << ' ' << setprecision(3) << setiosflags(ios::fixed) << y << endl;
  }
  return 0;
}

C++: #include <stdio.h>

int main(void){

    float a,b,c,d,e,f;
    float x,y;
    float tmp1,tmp2;
    
    while(1){
        a = 2000;
        scanf("%.3f %.3f %.3f %.3f %.3f %.3f", &a, &b, &c, &d, &e, &f);
        if(a == 2000)break;
    
        tmp1 = c*e - b*f;
        tmp2 = a*e - b*d;
        x = tmp1 / tmp2;
        tmp1 = a*f - c*d;
        tmp2 = a*e - b*d;
        y = tmp1 / tmp2;
        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;
	cout << setprecision(3);
	cout << fixed;
	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);
		int lastx = int(x * 10000) % 10;
		int lasty = int(y * 10000) % 10;
		if (lastx >= 5){
			x += 0.001;
		}
		if (lasty >= 5){
			y += 0.001;
		}
		cout << x << " " << y << endl;
	}
	return 0;
}

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

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

    return 0;
}

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

int main() {
	int cnt = 0;
	int a[200], b[200], c[200], d[200], e[200], f[200];
	double x[200], y[200];

	while(cin >> a[cnt] >> b[cnt] >> c[cnt] >> d[cnt] >> e[cnt] >> f[cnt]) cnt++;

	for(int i=0; i<cnt; i++) {
		if(a[i] != 0 && b[i] != 0 && d[i] != 0 && e[i] != 0) {
			x[i] = (b[i]*f[i]-e[i]*c[i])/(b[i]*d[i]-a[i]*e[i]);
			y[i] = (d[i]*c[i]-a[i]*f[i])/(b[i]*d[i]-a[i]*e[i]);
		} else {
			if(a[i] == 0) {
				y[i] = c[i]/b[i];
				x[i] = (f[i]-e[i]*y[i])/d[i];
			} else if(b[i] == 0) {
				x[i] = c[i]/a[i];
				y[i] = (f[i]-d[i]*x[i])/e[i];
			} else if(d[i] == 0) {
				y[i] = f[i]/e[i];
				x[i] = (c[i]-b[i]*y[i])/a[i];
			} else if(e[i] == 0) {
				x[i] = f[i]/d[i];
				y[i] = (c[i]-a[i]*x[i])/b[i];
			}
		}
	}

	for(int i=0; i<cnt; i++) cout << fixed << setprecision(3) << x[i] << " " << y[i] << endl;

	return 0;
}

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

int main()
{
	int a,b,c,d,e,f;
	double x,y;
	int count = 0;
	vector<double> result_x,result_y;

	while(cin >> a >> b >> c >> d >> e >> f) {
		y = (a * f - c * d) / (a * e - b * d);
		x = (c - b * y) / a;
		result_y.push_back(y);
		result_x.push_back(x);
		cout << result_x[count] << ' ' << result_y[count] << endl;
		count++;
	}

	return 0;
}